Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH 1/4] avcodec/libaribb24, ttmlenc, avutil/tx: Remove redundant init of AVBPrint
Date: Wed, 13 Sep 2023 21:44:29 +0200
Message-ID: <GV1P250MB0737A4B4301C28A29BCCB82B8FF0A@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <AS8P250MB0744B225ACBAE17540C9E6A28FF2A@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM>

Andreas Rheinhardt:
> An AVBPrint is initialized via av_bprint_init() (or
> av_bprint_init_for_buffer()) which expects uninitialized
> AVBPrints; it is therefore not necessary to zero them before
> the actual initialization.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
>  libavcodec/libaribb24.c | 2 +-
>  libavcodec/ttmlenc.c    | 2 +-
>  libavutil/tx.c          | 4 ++--
>  3 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/libavcodec/libaribb24.c b/libavcodec/libaribb24.c
> index 8032536b22..551be89ffd 100644
> --- a/libavcodec/libaribb24.c
> +++ b/libavcodec/libaribb24.c
> @@ -227,7 +227,7 @@ static int libaribb24_handle_regions(AVCodecContext *avctx, AVSubtitle *sub)
>      Libaribb24Context *b24 = avctx->priv_data;
>      const arib_buf_region_t *region = arib_decoder_get_regions(b24->decoder);
>      unsigned int profile_font_size = get_profile_font_size(avctx);
> -    AVBPrint buf = { 0 };
> +    AVBPrint buf;
>      int ret = 0;
>  
>      av_bprint_init(&buf, 0, AV_BPRINT_SIZE_UNLIMITED);
> diff --git a/libavcodec/ttmlenc.c b/libavcodec/ttmlenc.c
> index fb05c38968..6a2ab23cab 100644
> --- a/libavcodec/ttmlenc.c
> +++ b/libavcodec/ttmlenc.c
> @@ -45,7 +45,7 @@ typedef struct {
>  static void ttml_text_cb(void *priv, const char *text, int len)
>  {
>      TTMLContext *s = priv;
> -    AVBPrint cur_line = { 0 };
> +    AVBPrint cur_line;
>      AVBPrint *buffer = &s->buffer;
>  
>      av_bprint_init(&cur_line, len, AV_BPRINT_SIZE_UNLIMITED);
> diff --git a/libavutil/tx.c b/libavutil/tx.c
> index 24b2015b44..d6740071b9 100644
> --- a/libavutil/tx.c
> +++ b/libavutil/tx.c
> @@ -595,7 +595,7 @@ static void print_type(AVBPrint *bp, enum AVTXType type)
>  
>  static void print_cd_info(const FFTXCodelet *cd, int prio, int len, int print_prio)
>  {
> -    AVBPrint bp = { 0 };
> +    AVBPrint bp;
>      av_bprint_init(&bp, 0, AV_BPRINT_SIZE_AUTOMATIC);
>  
>      av_bprintf(&bp, "%s - type: ", cd->name);
> @@ -718,7 +718,7 @@ av_cold int ff_tx_init_subtx(AVTXContext *s, enum AVTXType type,
>      int codelet_list_idx = codelet_list_num;
>      int nb_cd_matches = 0;
>  #if !CONFIG_SMALL
> -    AVBPrint bp = { 0 };
> +    AVBPrint bp;
>  #endif
>  
>      /* We still accept functions marked with SLOW, even if the CPU is

Will apply this patchset tomorrow unless there are objections.

- Andreas

_______________________________________________
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-09-13 19:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-11 15:30 Andreas Rheinhardt
2023-09-11 15:31 ` [FFmpeg-devel] [PATCH 2/4] avcodec/libaribb24: Use FF_CODEC_CAP_INIT_CLEANUP Andreas Rheinhardt
2023-09-11 15:31 ` [FFmpeg-devel] [PATCH 3/4] avcodec/imc: Fix leak on init error Andreas Rheinhardt
2023-09-11 17:10   ` Paul B Mahol
2023-09-11 15:31 ` [FFmpeg-devel] [PATCH 4/4] avcodec/flicvideo: Remove unnecessary cast Andreas Rheinhardt
2023-09-11 17:10   ` Paul B Mahol
2023-09-13 19:44 ` Andreas Rheinhardt [this message]

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=GV1P250MB0737A4B4301C28A29BCCB82B8FF0A@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM \
    --to=andreas.rheinhardt@outlook.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /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