Commit 60af6c31 authored by Michael Niedermayer's avatar Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 28245fb4
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment