[FFmpeg-cvslog] h264: Fix recovery_frame initialization when recovery_frame is -1
Michael Niedermayer
git at videolan.org
Sun Jan 1 21:52:32 CET 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Dec 31 22:15:45 2011 +0100| [fba6777363eb74d926aa0eed281a77ff152a3ad5] | committer: Michael Niedermayer
h264: Fix recovery_frame initialization when recovery_frame is -1
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fba6777363eb74d926aa0eed281a77ff152a3ad5
---
libavcodec/h264.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index b0c5049..27240e0 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);
}
More information about the ffmpeg-cvslog
mailing list