Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Zhao Zhili <quinkblack@foxmail.com>
To: ffmpeg-devel@ffmpeg.org
Cc: Zhao Zhili <zhilizhao@tencent.com>
Subject: [FFmpeg-devel] [PATCH v2 2/5] avcodec/h264_mp4toannexb_bsf: remove pass padding size as argument
Date: Fri,  7 Jul 2023 00:19:54 +0800
Message-ID: <tencent_C5ABC54E7A701A2D0D9A2C40009A619F4608@qq.com> (raw)
In-Reply-To: <20230706161957.1758621-1-quinkblack@foxmail.com>

From: Zhao Zhili <zhilizhao@tencent.com>

It's a fixed value. There is no use case to change that.
---
 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;
 
-- 
2.25.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

  parent reply	other threads:[~2023-07-06  8:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230519164133.3278597-1-quinkblack@foxmail.com>
2023-05-19 16:41 ` [FFmpeg-devel] [PATCH " Zhao Zhili
2023-05-19 16:41 ` [FFmpeg-devel] [PATCH 3/5] avcodec/h264_mp4toannexb_bsf: fix missing PS before IDR frames Zhao Zhili
2023-07-05 16:08   ` Thilo Borgmann
2023-07-06  8:55     ` Thilo Borgmann
2023-07-06 16:19     ` [FFmpeg-devel] [PATCH v2 1/5] avcodec/h264_mp4toannexb_bsf: refactor start_code_size handling Zhao Zhili
     [not found]     ` <20230706161957.1758621-1-quinkblack@foxmail.com>
2023-07-06 16:19       ` Zhao Zhili [this message]
2023-07-06 16:19       ` [FFmpeg-devel] [PATCH v2 3/5] avcodec/h264_mp4toannexb_bsf: fix missing PS before IDR frames Zhao Zhili
2023-07-06 16:19       ` [FFmpeg-devel] [PATCH v2 4/5] avcodec/h264_mp4toannexb_bsf: process new extradata Zhao Zhili
2023-07-06 16:19       ` [FFmpeg-devel] [PATCH v2 5/5] fate/h264: move mp4toannexb_ticket5927 test to fate-h264 Zhao Zhili
2023-05-19 16:41 ` [FFmpeg-devel] [PATCH 4/5] avcodec/h264_mp4toannexb_bsf: process new extradata Zhao Zhili
2023-05-19 16:41 ` [FFmpeg-devel] [PATCH 5/5] fate/h264: move mp4toannexb_ticket5927 test to fate-h264 Zhao Zhili

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tencent_C5ABC54E7A701A2D0D9A2C40009A619F4608@qq.com \
    --to=quinkblack@foxmail.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    --cc=zhilizhao@tencent.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git