avcodec/bsf/extract_extradata: Remove pointless checks

It doesn't hurt to keep track of filtered_size:
The end result will be ignored if extradata is not removed
from the bitstream.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2026-03-21 00:03:38 +01:00 committed by James Almer
parent 1dd853010a
commit 9d97771bc6

View file

@ -112,7 +112,7 @@ static int extract_extradata_av1(AVBSFContext *ctx, AVPacket *pkt,
extradata_size += obu->raw_size;
if (obu->type == AV1_OBU_SEQUENCE_HEADER)
has_seq = 1;
} else if (s->remove) {
} else {
filtered_size += obu->raw_size;
}
}
@ -213,7 +213,7 @@ static int extract_extradata_h2645(AVBSFContext *ctx, AVPacket *pkt,
} else {
if (nal->type == H264_NAL_SPS) has_sps = 1;
}
} else if (s->remove) {
} else {
filtered_size += nal->raw_size + 3 +
ff_h2645_unit_requires_zero_byte(ctx->par_in->codec_id, nal->type, filtered_nb_nals++);
}