mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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>
This commit is contained in:
parent
3a7f00810c
commit
8824a9ed22
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user