fix overwriting bitrate with signal type
I recently opened a bug: http://bugs.musicpd.org/view.php?id=3787 The main problem is that opus encoder config for signal overwrote bitrate setting.
This commit is contained in:

committed by
Max Kellermann

parent
b2d3d15e97
commit
906d2fbadf
@@ -106,11 +106,11 @@ opus_encoder_configure(struct opus_encoder *encoder,
|
|||||||
|
|
||||||
value = config_get_block_string(param, "signal", "auto");
|
value = config_get_block_string(param, "signal", "auto");
|
||||||
if (strcmp(value, "auto") == 0)
|
if (strcmp(value, "auto") == 0)
|
||||||
encoder->bitrate = OPUS_AUTO;
|
encoder->signal = OPUS_AUTO;
|
||||||
else if (strcmp(value, "voice") == 0)
|
else if (strcmp(value, "voice") == 0)
|
||||||
encoder->bitrate = OPUS_SIGNAL_VOICE;
|
encoder->signal = OPUS_SIGNAL_VOICE;
|
||||||
else if (strcmp(value, "music") == 0)
|
else if (strcmp(value, "music") == 0)
|
||||||
encoder->bitrate = OPUS_SIGNAL_MUSIC;
|
encoder->signal = OPUS_SIGNAL_MUSIC;
|
||||||
else {
|
else {
|
||||||
g_set_error(error_r, opus_encoder_quark(), 0,
|
g_set_error(error_r, opus_encoder_quark(), 0,
|
||||||
"Invalid signal");
|
"Invalid signal");
|
||||||
|
Reference in New Issue
Block a user