]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-6815 #comment force 1600hz for native g722
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 10 Sep 2014 18:09:32 +0000 (14:09 -0400)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 10 Sep 2014 18:09:32 +0000 (14:09 -0400)
src/mod/formats/mod_native_file/mod_native_file.c

index b875e82c2239865bc226fca70a579eadc78a839b..d2db2b1b5289b2a4fb67b906625909283dcb6610 100644 (file)
@@ -83,6 +83,13 @@ static switch_status_t native_file_file_open(switch_file_handle_t *handle, const
 
        handle->samples = 0;
        handle->samplerate = 8000;
+
+       if (ext) {
+               if (!strcasecmp(ext, "G722")) {
+                       handle->samplerate = 16000;
+               }
+       }
+
        handle->channels = 1;
        handle->format = 0;
        handle->sections = 0;