From: Dragos Oancea Date: Fri, 21 Jul 2017 16:10:25 +0000 (-0400) Subject: FS-10529: [mod_native_file] do not register "opus" file extension (needs ogg/opus... X-Git-Tag: v1.8.0~306^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6bac8ddcc3ab7a2626750a8befe5f8459b2c9d9a;p=thirdparty%2Ffreeswitch.git FS-10529: [mod_native_file] do not register "opus" file extension (needs ogg/opus support). Use encoded_bytes_per_packet to skip other extensions too. --- diff --git a/src/mod/formats/mod_native_file/mod_native_file.c b/src/mod/formats/mod_native_file/mod_native_file.c index 1ea69c404b..1cfe1740a7 100644 --- a/src/mod/formats/mod_native_file/mod_native_file.c +++ b/src/mod/formats/mod_native_file/mod_native_file.c @@ -184,6 +184,9 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_native_file_load) uint32_t x; for (x = 0; x < num_codecs; x++) { + if (codecs[x]->encoded_bytes_per_packet == 0) { + continue; + } supported_formats[x] = switch_core_strdup(pool, codecs[x]->iananame); }