Browse Source

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@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit a92f8edf0c)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
tags/n3.0.5
Andreas Cadhalpun 9 years ago
parent
commit
30d542d55d
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      libavcodec/mpeg12dec.c

+ 1
- 0
libavcodec/mpeg12dec.c View File

@@ -2827,6 +2827,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;


Loading…
Cancel
Save