Commit a92f8edf authored by Andreas Cadhalpun's avatar 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: 's avatarMichael Niedermayer <michael@niedermayer.cc>
Signed-off-by: 's avatarAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
parent 1966ea01
...@@ -2808,6 +2808,7 @@ static int mpeg_decode_frame(AVCodecContext *avctx, void *data, ...@@ -2808,6 +2808,7 @@ static int mpeg_decode_frame(AVCodecContext *avctx, void *data,
avctx->extradata, avctx->extradata_size); avctx->extradata, avctx->extradata_size);
if (*got_output) { if (*got_output) {
av_log(avctx, AV_LOG_ERROR, "picture in extradata\n"); av_log(avctx, AV_LOG_ERROR, "picture in extradata\n");
av_frame_unref(picture);
*got_output = 0; *got_output = 0;
} }
s->extradata_decoded = 1; s->extradata_decoded = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment