aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-11-11 23:24:54 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-11-12 01:43:11 +0100
commit8824a9ed2291d2b004dc641bd9ea8ad6f983466a (patch)
tree5cc368d0614efc1c21e2adb48f7244d06d830c2f
parent3a7f00810c26f478b31e1c2d99ccb1da49ea02e4 (diff)
downloadffmpeg-8824a9ed2291d2b004dc641bd9ea8ad6f983466a.tar.gz
mpeg12: clean current picture ptr.
This avoids having a stray pointer left that may not represent the current picture and state. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/mpeg12.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index b5bf68d683..234cac49f2 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -2528,6 +2528,8 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
MpegEncContext *s2 = &s->mpeg_enc_ctx;
av_dlog(avctx, "fill_buffer\n");
+ s2->current_picture_ptr = NULL;
+
if (buf_size == 0 || (buf_size == 4 && AV_RB32(buf) == SEQ_END_CODE)) {
/* special case for last picture */
if (s2->low_delay == 0 && s2->next_picture_ptr) {