h264: Fix recovery_frame initialization when recovery_frame is -1

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/3/head
Michael Niedermayer 13 years ago
parent 36fa781bd6
commit fba6777363
  1. 3
      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);
}

Loading…
Cancel
Save