Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 1/4] avcodec/libaribb24, ttmlenc, avutil/tx: Remove redundant init of AVBPrint
@ 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
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Andreas Rheinhardt @ 2023-09-11 15:30 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: 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
-- 
2.34.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".

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-09-13 19:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-11 15:30 [FFmpeg-devel] [PATCH 1/4] avcodec/libaribb24, ttmlenc, avutil/tx: Remove redundant init of AVBPrint 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 ` [FFmpeg-devel] [PATCH 1/4] avcodec/libaribb24, ttmlenc, avutil/tx: Remove redundant init of AVBPrint Andreas Rheinhardt

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