From: tolgakaan12 <[email protected]>
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 -- [email protected]
To unsubscribe send an email to [email protected]