Commit 0022fb10 authored by Max Kellermann's avatar Max Kellermann

encoder/lame: explicitly configure the output sample rate

When you don't explicitly set an output sample rate, liblame tries to guess an output sample rate from the input sample rate. You would think that this "guessing" consists of just setting both equal, but that is not the case. For 44.1kHz at 96kbit/s, liblame chooses 32kHz. This patch explicitly configures the output sample rate, to stop the bad guessing.
parent 4f2d67df
ver 0.15.16 (2010/??/??)
* encoders:
- lame: explicitly configure the output sample rate
ver 0.15.15 (2010/11/08)
......
......@@ -169,6 +169,13 @@ lame_encoder_setup(struct lame_encoder *encoder, GError **error)
return false;
}
if (0 != lame_set_out_samplerate(encoder->gfp,
encoder->audio_format.sample_rate)) {
g_set_error(error, lame_encoder_quark(), 0,
"error setting lame out sample rate");
return false;
}
if (0 > lame_init_params(encoder->gfp)) {
g_set_error(error, lame_encoder_quark(), 0,
"error initializing lame params");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment