]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
the other way works better revert 91ffe171b6e76f60f1e94f148176ce8556d460e6 to use...
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 2 Oct 2014 15:41:59 +0000 (10:41 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 2 Oct 2014 15:41:59 +0000 (10:41 -0500)
src/mod/codecs/mod_opus/mod_opus.c

index 23dff7a544f60bdd6b04c75c867da2e1a65ff323..5a9593463f5fbb571b8fcc636bcd5045428012f5 100644 (file)
@@ -276,7 +276,7 @@ static switch_status_t switch_opus_init(switch_codec_t *codec, switch_codec_flag
         
                context->encoder_object = opus_encoder_create(samplerate,
                                                                                                          codec->implementation->number_of_channels,
-                                                                                                         OPUS_APPLICATION_VOIP, &err);
+                                                                                                         codec->implementation->number_of_channels == 1 ? OPUS_APPLICATION_VOIP : OPUS_APPLICATION_AUDIO, &err);
         
         if (err != OPUS_OK) {
             switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot create encoder: %s\n", opus_strerror(err));