diff options
author | Anton Khirnov <anton@khirnov.net> | 2016-04-11 15:38:42 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2016-04-24 10:06:24 +0200 |
commit | 99c554efc8b09c3f1bb2fb41c3da5431085f7470 (patch) | |
tree | ed3b0864fd8a9b7c86b9f33cc483681271ba68c2 /libavcodec/h264.c | |
parent | 5b35b290dd76db64f079b3940f6148c8f273fc17 (diff) | |
download | ffmpeg-99c554efc8b09c3f1bb2fb41c3da5431085f7470.tar.gz |
h264: eliminate low_delay
It is always unconditionally initialized in decode_postinit() and then
immediately used in one place further below. All the other places where
it is accessed are just useless fluff.
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 434d561c0e..47e3c93517 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -334,10 +334,6 @@ av_cold int ff_h264_decode_init(AVCodecContext *avctx) if (ret < 0) return ret; - /* set defaults */ - if (!avctx->has_b_frames) - h->low_delay = 1; - ret = ff_thread_once(&h264_vlc_init, ff_h264_decode_init_vlc); if (ret != 0) { av_log(avctx, AV_LOG_ERROR, "pthread_once has failed."); @@ -363,7 +359,6 @@ av_cold int ff_h264_decode_init(AVCodecContext *avctx) if (h->ps.sps && h->ps.sps->bitstream_restriction_flag && h->avctx->has_b_frames < h->ps.sps->num_reorder_frames) { h->avctx->has_b_frames = h->ps.sps->num_reorder_frames; - h->low_delay = 0; } avctx->internal->allocate_progress = 1; @@ -581,7 +576,6 @@ static void decode_postinit(H264Context *h, int setup_finished) h->avctx->strict_std_compliance >= FF_COMPLIANCE_NORMAL) { h->avctx->has_b_frames = FFMAX(h->avctx->has_b_frames, sps->num_reorder_frames); } - h->low_delay = !h->avctx->has_b_frames; pics = 0; while (h->delayed_pic[pics]) @@ -646,12 +640,10 @@ static void decode_postinit(H264Context *h, int setup_finished) if (invalid + cnt < MAX_DELAYED_PIC_COUNT) { h->avctx->has_b_frames = FFMAX(h->avctx->has_b_frames, cnt); } - h->low_delay = 0; - } else if (h->low_delay && + } else if (!h->avctx->has_b_frames && ((h->next_outputed_poc != INT_MIN && out->poc > h->next_outputed_poc + 2) || cur->f->pict_type == AV_PICTURE_TYPE_B)) { - h->low_delay = 0; h->avctx->has_b_frames++; } |