diff options
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index fd33aeff3e..ff38bd7db7 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -3770,7 +3770,11 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){ } //FIXME do not discard SEI id - if(avctx->skip_frame >= AVDISCARD_NONREF && h->nal_ref_idc == 0) + 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: @@ -3807,6 +3811,9 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){ } 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!=AV_PICTURE_TYPE_B) && (avctx->skip_frame < AVDISCARD_NONKEY || hx->slice_type_nos==AV_PICTURE_TYPE_I) @@ -3844,6 +3851,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!=AV_PICTURE_TYPE_B) && (avctx->skip_frame < AVDISCARD_NONKEY || hx->slice_type_nos==AV_PICTURE_TYPE_I) @@ -3982,7 +3992,11 @@ static int decode_frame(AVCodecContext *avctx, } if(!(s->flags2 & CODEC_FLAG2_CHUNKS) && !s->current_picture_ptr){ - if (avctx->skip_frame >= AVDISCARD_NONREF) + 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; |