mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
h264: factor "if(h->sei_recovery_frame_cnt >= 0)" out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
f578e5d937
commit
647adc4290
@ -4845,17 +4845,18 @@ again:
|
||||
if ((err = decode_slice_header(hx, h)))
|
||||
break;
|
||||
|
||||
if (h->sei_recovery_frame_cnt >= 0 && (h->frame_num != h->sei_recovery_frame_cnt || hx->slice_type_nos != AV_PICTURE_TYPE_I))
|
||||
h->valid_recovery_point = 1;
|
||||
if (h->sei_recovery_frame_cnt >= 0) {
|
||||
if (h->frame_num != h->sei_recovery_frame_cnt || hx->slice_type_nos != AV_PICTURE_TYPE_I)
|
||||
h->valid_recovery_point = 1;
|
||||
|
||||
if ( h->sei_recovery_frame_cnt >= 0
|
||||
&& ( 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) - 1);
|
||||
if ( 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) - 1);
|
||||
|
||||
if (!h->valid_recovery_point)
|
||||
h->recovery_frame = h->frame_num;
|
||||
if (!h->valid_recovery_point)
|
||||
h->recovery_frame = h->frame_num;
|
||||
}
|
||||
}
|
||||
|
||||
h->cur_pic_ptr->f.key_frame |=
|
||||
|
Loading…
Reference in New Issue
Block a user