]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_silk] Fix mod_silk always init with maxaveragebitrate=20000
authorsunlin <sunlin7@yahoo.com>
Thu, 7 May 2020 21:52:39 +0000 (05:52 +0800)
committerGitHub <noreply@github.com>
Thu, 7 May 2020 21:52:39 +0000 (01:52 +0400)
src/mod/codecs/mod_silk/mod_silk.c

index e437ed7df7e009e2ff046646b053a44175abf403..b41b8510eb43e65d7c0fe3cc7ebbe67811dc2de2 100644 (file)
@@ -175,6 +175,11 @@ static switch_status_t switch_silk_init(switch_codec_t *codec,
        }
 
        memset(&codec_fmtp, '\0', sizeof(struct switch_codec_fmtp));
+       codec_fmtp.actual_samples_per_second = codec->implementation->actual_samples_per_second;
+       codec_fmtp.bits_per_second = codec->implementation->bits_per_second;
+       codec_fmtp.microseconds_per_packet = codec->implementation->microseconds_per_packet;
+       codec_fmtp.stereo = codec->implementation->number_of_channels > 1;
+
        codec_fmtp.private_info = &silk_codec_settings;
        switch_silk_fmtp_parse(codec->fmtp_in, &codec_fmtp);