summaryrefslogtreecommitdiff
path: root/libavcodec
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-10-21 19:41:29 +0200
commita92f8edf0c51781e152651cce2e753ad6e359eb2 (patch)
tree7fa1a7bd1af4962ca6a3a3b3b71e14f9c08bdc56 /libavcodec
parent1966ea012fd72abc8003e95dc3c8ad9e9f197913 (diff)
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>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpeg12dec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 44f7b61e46..ac8160daff 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -2808,6 +2808,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;