]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix vid issue
authorAnthony Minessale <anthony.minessale@gmail.com>
Tue, 6 May 2008 00:02:37 +0000 (00:02 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Tue, 6 May 2008 00:02:37 +0000 (00:02 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8267 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_loadable_module.c

index 3b45a3f8a8452443282788fe5d0f8f521e7825d2..1c64030933539aa1bf06ea6a2ea36ac032d2f443 100644 (file)
@@ -1276,12 +1276,14 @@ SWITCH_DECLARE(int) switch_loadable_module_get_codecs_sorted(const switch_codec_
                                for (imp = codec_interface->implementations; imp; imp = imp->next) {
                                        uint8_t match = 1;
 
-                                       if ((uint32_t) (imp->microseconds_per_frame / 1000) != 20) {
-                                               match = 0;
-                                       }
+                                       if (imp->codec_type != SWITCH_CODEC_TYPE_VIDEO) {
+                                               if ((uint32_t) (imp->microseconds_per_frame / 1000) != 20) {
+                                                       match = 0;
+                                               }
 
-                                       if (match && rate && (uint32_t) imp->samples_per_second != rate) {
-                                               match = 0;
+                                               if (match && rate && (uint32_t) imp->samples_per_second != rate) {
+                                                       match = 0;
+                                               }
                                        }
 
                                        if (match) {
@@ -1295,12 +1297,14 @@ SWITCH_DECLARE(int) switch_loadable_module_get_codecs_sorted(const switch_codec_
                        for (imp = codec_interface->implementations; imp; imp = imp->next) {
                                uint8_t match = 1;
 
-                               if (interval && (uint32_t) (imp->microseconds_per_frame / 1000) != interval) {
-                                       match = 0;
-                               }
+                               if (imp->codec_type != SWITCH_CODEC_TYPE_VIDEO) {
+                                       if (interval && (uint32_t) (imp->microseconds_per_frame / 1000) != interval) {
+                                               match = 0;
+                                       }
 
-                               if (match && rate && (uint32_t) imp->samples_per_second != rate) {
-                                       match = 0;
+                                       if (match && rate && (uint32_t) imp->samples_per_second != rate) {
+                                               match = 0;
+                                       }
                                }
 
                                if (match) {