summaryrefslogtreecommitdiff
path: root/libavcodec/h264_slice.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-04-11 15:38:42 +0200
committerAnton Khirnov <anton@khirnov.net>2016-04-24 10:06:24 +0200
commit99c554efc8b09c3f1bb2fb41c3da5431085f7470 (patch)
treeed3b0864fd8a9b7c86b9f33cc483681271ba68c2 /libavcodec/h264_slice.c
parent5b35b290dd76db64f079b3940f6148c8f273fc17 (diff)
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_slice.c')
-rw-r--r--libavcodec/h264_slice.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 1251ff576f..fda6d3225e 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -378,7 +378,6 @@ int ff_h264_update_thread_context(AVCodecContext *dst,
h->first_field = h1->first_field;
h->picture_structure = h1->picture_structure;
h->droppable = h1->droppable;
- h->low_delay = h1->low_delay;
for (i = 0; i < H264_MAX_PICTURE_COUNT; i++) {
ff_h264_unref_picture(h, &h->DPB[i]);
@@ -397,7 +396,6 @@ int ff_h264_update_thread_context(AVCodecContext *dst,
h->enable_er = h1->enable_er;
h->workaround_bugs = h1->workaround_bugs;
- h->low_delay = h1->low_delay;
h->droppable = h1->droppable;
// extradata/NAL handling
@@ -1014,20 +1012,6 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl)
if (h->bit_depth_luma != h->ps.sps->bit_depth_luma ||
h->chroma_format_idc != h->ps.sps->chroma_format_idc)
needs_reinit = 1;
-
- if (h->flags & AV_CODEC_FLAG_LOW_DELAY ||
- (h->ps.sps->bitstream_restriction_flag &&
- !h->ps.sps->num_reorder_frames)) {
- if (h->avctx->has_b_frames > 1 || h->delayed_pic[0])
- av_log(h->avctx, AV_LOG_WARNING, "Delayed frames seen. "
- "Reenabling low delay requires a codec flush.\n");
- else
- h->low_delay = 1;
- }
-
- if (h->avctx->has_b_frames < 2)
- h->avctx->has_b_frames = !h->low_delay;
-
}
pps = h->ps.pps;