diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-01-01 01:15:45 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-01-02 00:43:43 +0400 |
commit | fba6777363eb74d926aa0eed281a77ff152a3ad5 (patch) | |
tree | b31ee1c8b3f4bee6c4372fa01f5ee0ddcbacb3a7 /libavcodec | |
parent | 36fa781bd6b4e0f40abd31431af2d29d87e9b194 (diff) |
h264: Fix recovery_frame initialization when recovery_frame is -1
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-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 b0c5049483..27240e00d9 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -3896,7 +3896,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); } |