aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2016-10-20 22:51:55 +0200
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2016-11-27 00:38:55 +0100
commit30d542d55ddbcb2edb0f1351e1ecb6ad286b37ff (patch)
tree32fa96dbc2bf620b1bfb0da732213e2865abaeaf
parent1d439041ece002c6b2e8e3d57c3b389f9fc279b6 (diff)
downloadffmpeg-30d542d55ddbcb2edb0f1351e1ecb6ad286b37ff.tar.gz
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 a92f8edf0c51781e152651cce2e753ad6e359eb2) Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
-rw-r--r--libavcodec/mpeg12dec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index caa5f0c043..5a70148c5f 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -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;