aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2019-12-09 23:26:02 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2020-05-19 17:17:36 +0200
commitb10b63f24a27b466565e07dadd90c7816a8c6a33 (patch)
treee2fd8e02b974646eb0b23f056b1af092e84ea5a1
parent5921562180b864b0623229352886ef51a510aecc (diff)
downloadffmpeg-b10b63f24a27b466565e07dadd90c7816a8c6a33.tar.gz
avcodec/cbs_h2645: Remove dead code to delete trailing zeroes
Trailing zeroes are already discarded when splitting a fragment, which makes the code to remove them when decomposing slices dead code. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 8f701932b39a6345f2a8bab85f48d555a98802e3) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/cbs_h2645.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c
index 3fed343c02..cc71ac6618 100644
--- a/libavcodec/cbs_h2645.c
+++ b/libavcodec/cbs_h2645.c
@@ -860,13 +860,6 @@ static int cbs_h264_read_nal_unit(CodedBitstreamContext *ctx,
pos = get_bits_count(&gbc);
len = unit->data_size;
- if (!unit->data[len - 1]) {
- int z;
- for (z = 0; z < len && !unit->data[len - z - 1]; z++);
- av_log(ctx->log_ctx, AV_LOG_DEBUG, "Deleted %d trailing zeroes "
- "from slice data.\n", z);
- len -= z;
- }
slice->data_size = len - pos / 8;
slice->data_ref = av_buffer_ref(unit->data_ref);
@@ -1042,13 +1035,6 @@ static int cbs_h265_read_nal_unit(CodedBitstreamContext *ctx,
pos = get_bits_count(&gbc);
len = unit->data_size;
- if (!unit->data[len - 1]) {
- int z;
- for (z = 0; z < len && !unit->data[len - z - 1]; z++);
- av_log(ctx->log_ctx, AV_LOG_DEBUG, "Deleted %d trailing zeroes "
- "from slice data.\n", z);
- len -= z;
- }
slice->data_size = len - pos / 8;
slice->data_ref = av_buffer_ref(unit->data_ref);