History

avcodec/h264_mp4toannexb_bsf: remove pass padding size as argument

It's a fixed value. There is no use case to change that.

Zhao Zhili committed 3 years ago

Commit 4c4b8331 parent 91cbae21 file · +3 −2Browse files

Unified · Split

libavcodec/h264_mp4toannexb_bsf.c+3−2
@@ -78,7 +78,7 @@ static void count_or_copy(uint8_t **out, uint64_t *out_size, · 77 unmodified lines
7878 *out_size += start_code_size + in_size;
7979 }
8080
81−static int h264_extradata_to_annexb(AVBSFContext *ctx, const int padding)
81+static int h264_extradata_to_annexb(AVBSFContext *ctx)
8282 {
8383 H264BSFContext *s = ctx->priv_data;
8484 GetByteContext ogb, *gb = &ogb;
@@ -86,6 +86,7 @@ static int h264_extradata_to_annexb(AVBSFContext *ctx, const int padding) · 1 unmodified line
8686 uint32_t total_size = 0;
8787 uint8_t *out = NULL, unit_nb, sps_done = 0;
8888 static const uint8_t nalu_header[4] = { 0, 0, 0, 1 };
89+ const int padding = AV_INPUT_BUFFER_PADDING_SIZE;
8990 int length_size, pps_offset = 0;
9091
9192 bytestream2_init(gb, ctx->par_in->extradata, ctx->par_in->extradata_size);
@@ -165,7 +166,7 @@ static int h264_mp4toannexb_init(AVBSFContext *ctx) · 73 unmodified lines
165166 av_log(ctx, AV_LOG_VERBOSE,
166167 "The input looks like it is Annex B already\n");
167168 } else if (extra_size >= 7) {
168− ret = h264_extradata_to_annexb(ctx, AV_INPUT_BUFFER_PADDING_SIZE);
169+ ret = h264_extradata_to_annexb(ctx);
169170 if (ret < 0)
170171 return ret;
171172

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t