aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Larisch <mail@matthias-larisch.de>2013-06-21 10:22:11 +0200
committerMax Kellermann <max@duempel.org>2013-06-24 16:08:25 +0200
commit906d2fbadf075b7d8e3a5be7134a9bebb09b7285 (patch)
treee46f1a6d6a7b82486131bbf8254bd3415085ba42 /src
parentb2d3d15e978aef2566a1bdae435d71cb326dec4d (diff)
downloadmpd-906d2fbadf075b7d8e3a5be7134a9bebb09b7285.tar.gz
mpd-906d2fbadf075b7d8e3a5be7134a9bebb09b7285.tar.xz
mpd-906d2fbadf075b7d8e3a5be7134a9bebb09b7285.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/encoder/OpusEncoderPlugin.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/encoder/OpusEncoderPlugin.cxx b/src/encoder/OpusEncoderPlugin.cxx
index 8d2c0974b..7167473e5 100644
--- a/src/encoder/OpusEncoderPlugin.cxx
+++ b/src/encoder/OpusEncoderPlugin.cxx
@@ -106,11 +106,11 @@ opus_encoder_configure(struct opus_encoder *encoder,
value = config_get_block_string(param, "signal", "auto");
if (strcmp(value, "auto") == 0)
- encoder->bitrate = OPUS_AUTO;
+ encoder->signal = OPUS_AUTO;
else if (strcmp(value, "voice") == 0)
- encoder->bitrate = OPUS_SIGNAL_VOICE;
+ encoder->signal = OPUS_SIGNAL_VOICE;
else if (strcmp(value, "music") == 0)
- encoder->bitrate = OPUS_SIGNAL_MUSIC;
+ encoder->signal = OPUS_SIGNAL_MUSIC;
else {
g_set_error(error_r, opus_encoder_quark(), 0,
"Invalid signal");