From dfc3a69c5276edf84c933035ff2a7e278fa13c9a Mon Sep 17 00:00:00 2001 From: tytan652 Date: Tue, 12 Nov 2024 10:37:57 +0100 Subject: [PATCH] obs-ffmpeg: Avoid setting negative bitrate for lossless audio codec Since FFmpeg 7.1 a check was added to disallow pre-initializing encoder with a negative bitrate. https://github.com/FFmpeg/FFmpeg/commit/74385dd496bdcda9a6e029fabf4946f2234a0d13 --- plugins/obs-ffmpeg/obs-ffmpeg-audio-encoders.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/obs-ffmpeg/obs-ffmpeg-audio-encoders.c b/plugins/obs-ffmpeg/obs-ffmpeg-audio-encoders.c index 00d6934517b617..baa39072b8d56d 100644 --- a/plugins/obs-ffmpeg/obs-ffmpeg-audio-encoders.c +++ b/plugins/obs-ffmpeg/obs-ffmpeg-audio-encoders.c @@ -214,7 +214,7 @@ static void *enc_create(obs_data_t *settings, obs_encoder_t *encoder, const char if (codec_desc->props & AV_CODEC_PROP_LOSSLESS) // Set by encoder on init, not known at this time - enc->context->bit_rate = -1; + enc->context->bit_rate = 0; else enc->context->bit_rate = bitrate * 1000;