[FFmpeg-cvslog] mpeg12dec: unref discarded picture from extradata

Andreas Cadhalpun git at videolan.org
Sun Nov 27 01:48:26 EET 2016


ffmpeg | branch: release/2.8 | Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com> | Thu Oct 20 22:51:55 2016 +0200| [c5fb9df38aac5ff5e6c136f2bb7d946822ba4cc9] | committer: Andreas Cadhalpun

mpeg12dec: unref discarded picture from extradata

Otherwise another frame gets referenced into picture, triggering an assert
(from commit 13aae8) in av_frame_ref.

Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
(cherry picked from commit a92f8edf0c51781e152651cce2e753ad6e359eb2)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c5fb9df38aac5ff5e6c136f2bb7d946822ba4cc9
---

 libavcodec/mpeg12dec.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 50bb8f0..c457ec8 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -2824,6 +2824,7 @@ static int mpeg_decode_frame(AVCodecContext *avctx, void *data,
                             avctx->extradata, avctx->extradata_size);
         if (*got_output) {
             av_log(avctx, AV_LOG_ERROR, "picture in extradata\n");
+            av_frame_unref(picture);
             *got_output = 0;
         }
         s->extradata_decoded = 1;



More information about the ffmpeg-cvslog mailing list