[FFmpeg-devel] [PATCH] cavsdec: unref frame before referencing again
Andreas Cadhalpun
andreas.cadhalpun at googlemail.com
Thu Oct 20 23:16:17 EEST 2016
This fixes asserts (from commit 13aae8) in av_frame_ref and
av_frame_move_ref.
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
---
libavcodec/cavsdec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c
index 70ac6f8..fed7043 100644
--- a/libavcodec/cavsdec.c
+++ b/libavcodec/cavsdec.c
@@ -1217,6 +1217,8 @@ static int cavs_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
h->got_keyframe = 1;
}
case PIC_PB_START_CODE:
+ if (*got_frame)
+ av_frame_unref(data);
*got_frame = 0;
if (!h->got_keyframe)
break;
--
2.9.3
More information about the ffmpeg-devel
mailing list