aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-11-02 01:02:21 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-11-02 01:02:21 +0100
commit647adc4290505fa87febd7829eacd494e265fffa (patch)
tree941aa097c42ea4b89a50bc07fb3c7056ecb51344 /libavcodec
parentf578e5d9376a20243f4286776f79a1e1c33b12cd (diff)
downloadffmpeg-647adc4290505fa87febd7829eacd494e265fffa.tar.gz
h264: factor "if(h->sei_recovery_frame_cnt >= 0)" out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index d93053a603..35b8c8c093 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -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 |=