mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-12-24 11:52:06 +08:00
Release frame after decoding is done
Originally committed as revision 20231 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@@ -213,6 +213,17 @@ static av_cold int ir2_decode_init(AVCodecContext *avctx){
|
||||
return 0;
|
||||
}
|
||||
|
||||
static av_cold int ir2_decode_end(AVCodecContext *avctx){
|
||||
Ir2Context * const ic = avctx->priv_data;
|
||||
AVFrame *pic = &ic->picture;
|
||||
|
||||
if (pic->data[0])
|
||||
avctx->release_buffer(avctx, pic);
|
||||
av_freep(&ic->picture);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
AVCodec indeo2_decoder = {
|
||||
"indeo2",
|
||||
CODEC_TYPE_VIDEO,
|
||||
@@ -220,7 +231,7 @@ AVCodec indeo2_decoder = {
|
||||
sizeof(Ir2Context),
|
||||
ir2_decode_init,
|
||||
NULL,
|
||||
NULL,
|
||||
ir2_decode_end,
|
||||
ir2_decode_frame,
|
||||
CODEC_CAP_DR1,
|
||||
.long_name = NULL_IF_CONFIG_SMALL("Intel Indeo 2"),
|
||||
|
||||
Reference in New Issue
Block a user