diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-20 15:03:13 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-20 15:03:13 +0100 |
commit | 60af6c3138dc501a647bc69b374d5d33d5d86ab5 (patch) | |
tree | 631a45d174acda62ebf72a4df0b4046874ab8760 /libavcodec | |
parent | 28245fb466d8deb401127e88f24aa82671936aee (diff) | |
download | ffmpeg-60af6c3138dc501a647bc69b374d5d33d5d86ab5.tar.gz |
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>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/h264.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index d2941ca695..87ad03f2c2 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -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); |