mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
vc1: fix a memleak.
Happens on a B-frame when neither low_delay nor last_picture_ptr is set (probably corrupted streams only). Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
This commit is contained in:
parent
ca41c72c6d
commit
de4ec972c0
@ -6097,12 +6097,11 @@ image:
|
|||||||
if ((ret = av_frame_ref(pict, &s->current_picture_ptr->f)) < 0)
|
if ((ret = av_frame_ref(pict, &s->current_picture_ptr->f)) < 0)
|
||||||
goto err;
|
goto err;
|
||||||
ff_print_debug_info(s, s->current_picture_ptr);
|
ff_print_debug_info(s, s->current_picture_ptr);
|
||||||
|
*got_frame = 1;
|
||||||
} else if (s->last_picture_ptr != NULL) {
|
} else if (s->last_picture_ptr != NULL) {
|
||||||
if ((ret = av_frame_ref(pict, &s->last_picture_ptr->f)) < 0)
|
if ((ret = av_frame_ref(pict, &s->last_picture_ptr->f)) < 0)
|
||||||
goto err;
|
goto err;
|
||||||
ff_print_debug_info(s, s->last_picture_ptr);
|
ff_print_debug_info(s, s->last_picture_ptr);
|
||||||
}
|
|
||||||
if (s->last_picture_ptr || s->low_delay) {
|
|
||||||
*got_frame = 1;
|
*got_frame = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user