diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-12-31 22:15:45 +0100 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2012-01-03 13:34:27 +0100 |
commit | b84683a906c0dc8103948b39d4887fadd398baa5 (patch) | |
tree | 68fc18a8b0fc6920031cc6c7100728c42cb9e3f5 | |
parent | 01ff5378f057277c994384d0ffb935763079bc2e (diff) | |
download | ffmpeg-b84683a906c0dc8103948b39d4887fadd398baa5.tar.gz |
h264: Fix recovery_frame initialization when recovery_frame is -1
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit fba6777363eb74d926aa0eed281a77ff152a3ad5)
-rw-r--r-- | libavcodec/h264.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 8d86677922..0b90d3749d 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -3891,7 +3891,8 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){ break; if ( h->sei_recovery_frame_cnt >= 0 - && ((h->recovery_frame - h->frame_num) & ((1 << h->sps.log2_max_frame_num)-1)) > h->sei_recovery_frame_cnt) { + && ( h->recovery_frame<0 + || ((h->recovery_frame - h->frame_num) & ((1 << h->sps.log2_max_frame_num)-1)) > h->sei_recovery_frame_cnt)) { h->recovery_frame = (h->frame_num + h->sei_recovery_frame_cnt) % (1 << h->sps.log2_max_frame_num); } |