Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Tolga Celebi via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Cc: tolgakaan12 <70590077+tolgakaan12@users.noreply.github.com>,
	Tolga Celebi <celebitolgakaan@gmail.com>
Subject: [FFmpeg-devel] [PATCH] fftools/ffmpeg_mux_init: do not write encoder metadata for ogg files with bitexact
Date: Sat, 15 Nov 2025 22:32:42 +0000
Message-ID: <20251115223242.90376-1-celebitolgakaan@gmail.com> (raw)

From: tolgakaan12 <70590077+tolgakaan12@users.noreply.github.com>

The set_encoder_id function in fftools/ffmpeg_mux_init was writing a shortened encoder tag even when -bitexact flag was set, instead of omitting it entirely like other formats (flac, mp3, wav) do. This patch makes the function return early if bitexact flag is set, ensuring no encoder metadata is written.

Fixes ticket #11656.
---
 fftools/ffmpeg_mux_init.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c
index bcbbee9126..3d13c9c257 100644
--- a/fftools/ffmpeg_mux_init.c
+++ b/fftools/ffmpeg_mux_init.c
@@ -1167,15 +1167,15 @@ static int set_encoder_id(OutputStream *ost, const AVCodec *codec)
     uint8_t *encoder_string;
     int encoder_string_len;
 
+    if (ost->file->bitexact || ost->bitexact)
+        return 0;
+
     encoder_string_len = sizeof(LIBAVCODEC_IDENT) + strlen(cname) + 2;
     encoder_string     = av_mallocz(encoder_string_len);
     if (!encoder_string)
         return AVERROR(ENOMEM);
 
-    if (!ost->file->bitexact && !ost->bitexact)
-        av_strlcpy(encoder_string, LIBAVCODEC_IDENT " ", encoder_string_len);
-    else
-        av_strlcpy(encoder_string, "Lavc ", encoder_string_len);
+    av_strlcpy(encoder_string, LIBAVCODEC_IDENT " ", encoder_string_len);
     av_strlcat(encoder_string, cname, encoder_string_len);
     av_dict_set(&ost->st->metadata, "encoder",  encoder_string,
                 AV_DICT_DONT_STRDUP_VAL | AV_DICT_DONT_OVERWRITE);
-- 
2.50.1 (Apple Git-155)

_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

             reply	other threads:[~2025-11-16  6:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-15 22:32 Tolga Celebi via ffmpeg-devel [this message]
2025-11-16  6:54 ` [FFmpeg-devel] " Gyan Doshi via ffmpeg-devel

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=20251115223242.90376-1-celebitolgakaan@gmail.com \
    --to=ffmpeg-devel@ffmpeg.org \
    --cc=70590077+tolgakaan12@users.noreply.github.com \
    --cc=celebitolgakaan@gmail.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