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) {