Commit b10b63f2 authored by Andreas Rheinhardt's avatar Andreas Rheinhardt Committed by Michael Niedermayer

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: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 8f701932)
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 59215621
...@@ -860,13 +860,6 @@ static int cbs_h264_read_nal_unit(CodedBitstreamContext *ctx, ...@@ -860,13 +860,6 @@ static int cbs_h264_read_nal_unit(CodedBitstreamContext *ctx,
pos = get_bits_count(&gbc); pos = get_bits_count(&gbc);
len = unit->data_size; 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_size = len - pos / 8;
slice->data_ref = av_buffer_ref(unit->data_ref); slice->data_ref = av_buffer_ref(unit->data_ref);
...@@ -1042,13 +1035,6 @@ static int cbs_h265_read_nal_unit(CodedBitstreamContext *ctx, ...@@ -1042,13 +1035,6 @@ static int cbs_h265_read_nal_unit(CodedBitstreamContext *ctx,
pos = get_bits_count(&gbc); pos = get_bits_count(&gbc);
len = unit->data_size; 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_size = len - pos / 8;
slice->data_ref = av_buffer_ref(unit->data_ref); slice->data_ref = av_buffer_ref(unit->data_ref);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment