1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

h264: Only apply error concealment if theres a frame

Without any correctly decoded slices, there can be no frame.

Fixes out of array reads

Found-by: Rafaël Carré
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-01-20 15:03:13 +01:00
parent 28245fb466
commit 60af6c3138

View File

@ -2360,7 +2360,7 @@ static int field_end(H264Context *h, int in_setup)
* past end by one (callers fault) and resync_mb_y != 0
* causes problems for the first MB line, too.
*/
if (!FIELD_PICTURE)
if (!FIELD_PICTURE && h->current_slice)
ff_er_frame_end(s);
ff_MPV_frame_end(s);