Skip to content

Commit

Permalink
obs-ffmpeg: Avoid setting negative bitrate for lossless audio codec
Browse files Browse the repository at this point in the history
Since FFmpeg 7.1 a check was added to disallow pre-initializing encoder
with a negative bitrate.

FFmpeg/FFmpeg@74385dd
  • Loading branch information
tytan652 authored and RytoEX committed Nov 20, 2024
1 parent 7ffc38e commit dfc3a69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/obs-ffmpeg/obs-ffmpeg-audio-encoders.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit dfc3a69

Please sign in to comment.