Skip to content

Commit dfc3a69

Browse files
tytan652RytoEX
authored andcommitted
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. FFmpeg/FFmpeg@74385dd
1 parent 7ffc38e commit dfc3a69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugins/obs-ffmpeg/obs-ffmpeg-audio-encoders.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ static void *enc_create(obs_data_t *settings, obs_encoder_t *encoder, const char
214214

215215
if (codec_desc->props & AV_CODEC_PROP_LOSSLESS)
216216
// Set by encoder on init, not known at this time
217-
enc->context->bit_rate = -1;
217+
enc->context->bit_rate = 0;
218218
else
219219
enc->context->bit_rate = bitrate * 1000;
220220

0 commit comments

Comments
 (0)