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
78 *out_size += start_code_size + in_size;78 *out_size += start_code_size + in_size;
79}79}
80 80
81static int h264_extradata_to_annexb(AVBSFContext *ctx, const int padding)81static int h264_extradata_to_annexb(AVBSFContext *ctx)
82{82{
83 H264BSFContext *s = ctx->priv_data;83 H264BSFContext *s = ctx->priv_data;
84 GetByteContext ogb, *gb = &ogb;84 GetByteContext ogb, *gb = &ogb;
@@ -86,6 +86,7 @@ static int h264_extradata_to_annexb(AVBSFContext *ctx, const int padding) · 1 unmodified line
86 uint32_t total_size = 0;86 uint32_t total_size = 0;
87 uint8_t *out = NULL, unit_nb, sps_done = 0;87 uint8_t *out = NULL, unit_nb, sps_done = 0;
88 static const uint8_t nalu_header[4] = { 0, 0, 0, 1 };88 static const uint8_t nalu_header[4] = { 0, 0, 0, 1 };
89 const int padding = AV_INPUT_BUFFER_PADDING_SIZE;
89 int length_size, pps_offset = 0;90 int length_size, pps_offset = 0;
90 91
91 bytestream2_init(gb, ctx->par_in->extradata, ctx->par_in->extradata_size);92 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
165 av_log(ctx, AV_LOG_VERBOSE,166 av_log(ctx, AV_LOG_VERBOSE,
166 "The input looks like it is Annex B already\n");167 "The input looks like it is Annex B already\n");
167 } else if (extra_size >= 7) {168 } else if (extra_size >= 7) {
168 ret = h264_extradata_to_annexb(ctx, AV_INPUT_BUFFER_PADDING_SIZE);169 ret = h264_extradata_to_annexb(ctx);
169 if (ret < 0)170 if (ret < 0)
170 return ret;171 return ret;
171 172

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