[FFmpeg-cvslog] avcodec/h264_mp4toannexb_bsf: remove pass padding size as argument
Zhao Zhili
git at videolan.org
Wed Nov 22 05:47:57 EET 2023
ffmpeg | branch: master | Zhao Zhili <zhilizhao at tencent.com> | Fri May 19 19:17:42 2023 +0800| [4c4b833abd5bf951e0466a3d236a6e1ee2bd7d3f] | committer: Zhao Zhili
avcodec/h264_mp4toannexb_bsf: remove pass padding size as argument
It's a fixed value. There is no use case to change that.
Signed-off-by: Zhao Zhili <zhilizhao at tencent.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4c4b833abd5bf951e0466a3d236a6e1ee2bd7d3f
---
libavcodec/h264_mp4toannexb_bsf.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libavcodec/h264_mp4toannexb_bsf.c b/libavcodec/h264_mp4toannexb_bsf.c
index 7dce1ae9b6..846671abb6 100644
--- a/libavcodec/h264_mp4toannexb_bsf.c
+++ b/libavcodec/h264_mp4toannexb_bsf.c
@@ -78,7 +78,7 @@ static void count_or_copy(uint8_t **out, uint64_t *out_size,
*out_size += start_code_size + in_size;
}
-static int h264_extradata_to_annexb(AVBSFContext *ctx, const int padding)
+static int h264_extradata_to_annexb(AVBSFContext *ctx)
{
H264BSFContext *s = ctx->priv_data;
GetByteContext ogb, *gb = &ogb;
@@ -86,6 +86,7 @@ static int h264_extradata_to_annexb(AVBSFContext *ctx, const int padding)
uint32_t total_size = 0;
uint8_t *out = NULL, unit_nb, sps_done = 0;
static const uint8_t nalu_header[4] = { 0, 0, 0, 1 };
+ const int padding = AV_INPUT_BUFFER_PADDING_SIZE;
int length_size, pps_offset = 0;
bytestream2_init(gb, ctx->par_in->extradata, ctx->par_in->extradata_size);
@@ -165,7 +166,7 @@ static int h264_mp4toannexb_init(AVBSFContext *ctx)
av_log(ctx, AV_LOG_VERBOSE,
"The input looks like it is Annex B already\n");
} else if (extra_size >= 7) {
- ret = h264_extradata_to_annexb(ctx, AV_INPUT_BUFFER_PADDING_SIZE);
+ ret = h264_extradata_to_annexb(ctx);
if (ret < 0)
return ret;
More information about the ffmpeg-cvslog
mailing list