summaryrefslogtreecommitdiff
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-04-02 11:56:21 +0200
committerAnton Khirnov <anton@khirnov.net>2011-04-02 16:17:24 +0200
commit8ed2ae09a25e5860342b97f7c2c7729fffaec320 (patch)
treef76a64838f4f7c71ec4bc121d8ec238235c40a5a /libavcodec/h264.c
parent9073ca6c6ebb9e3e9b60d968b7aa16cc8b6d558d (diff)
lavc: mark hurry_up for removal on next major bump
It has been deprecated for about five years, skip_idct/skip_frame should be used instead.
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 83ac10364a..dbf71a761e 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -2820,8 +2820,12 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
buf_index += consumed;
- if( (s->hurry_up == 1 && h->nal_ref_idc == 0) //FIXME do not discard SEI id
- ||(avctx->skip_frame >= AVDISCARD_NONREF && h->nal_ref_idc == 0))
+ //FIXME do not discard SEI id
+ if(
+#if FF_API_HURRY_UP
+ (s->hurry_up == 1 && h->nal_ref_idc == 0) ||
+#endif
+ (avctx->skip_frame >= AVDISCARD_NONREF && h->nal_ref_idc == 0))
continue;
again:
@@ -2852,7 +2856,10 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
s->current_picture_ptr->key_frame |=
(hx->nal_unit_type == NAL_IDR_SLICE) ||
(h->sei_recovery_frame_cnt >= 0);
- if(hx->redundant_pic_count==0 && hx->s.hurry_up < 5
+ if(hx->redundant_pic_count==0
+#if FF_API_HURRY_UP
+ && hx->s.hurry_up < 5
+#endif
&& (avctx->skip_frame < AVDISCARD_NONREF || hx->nal_ref_idc)
&& (avctx->skip_frame < AVDISCARD_BIDIR || hx->slice_type_nos!=FF_B_TYPE)
&& (avctx->skip_frame < AVDISCARD_NONKEY || hx->slice_type_nos==FF_I_TYPE)
@@ -2890,7 +2897,9 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
if(hx->redundant_pic_count==0 && hx->intra_gb_ptr && hx->s.data_partitioning
&& s->context_initialized
+#if FF_API_HURRY_UP
&& s->hurry_up < 5
+#endif
&& (avctx->skip_frame < AVDISCARD_NONREF || hx->nal_ref_idc)
&& (avctx->skip_frame < AVDISCARD_BIDIR || hx->slice_type_nos!=FF_B_TYPE)
&& (avctx->skip_frame < AVDISCARD_NONKEY || hx->slice_type_nos==FF_I_TYPE)
@@ -3011,7 +3020,12 @@ static int decode_frame(AVCodecContext *avctx,
}
if(!(s->flags2 & CODEC_FLAG2_CHUNKS) && !s->current_picture_ptr){
- if (avctx->skip_frame >= AVDISCARD_NONREF || s->hurry_up) return 0;
+ if (avctx->skip_frame >= AVDISCARD_NONREF
+#if FF_API_HURRY_UP
+ || s->hurry_up
+#endif
+ )
+ return 0;
av_log(avctx, AV_LOG_ERROR, "no frame!\n");
return -1;
}