]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7500: make 15fps the min detected speed
authorAnthony Minessale <anthm@freeswitch.org>
Mon, 20 Apr 2015 20:35:03 +0000 (15:35 -0500)
committerMichael Jerris <mike@jerris.com>
Thu, 28 May 2015 17:47:23 +0000 (12:47 -0500)
src/switch_core_media.c

index 877f6ee48734b9ded772bbc4ea26c46ffe790844..0b928bd4f1c70a61fa47e85e95f3b9d3e0c8b3a7 100644 (file)
@@ -316,7 +316,8 @@ SWITCH_DECLARE(uint32_t) switch_core_media_get_video_fps(switch_core_session_t *
 {
        switch_media_handle_t *smh;
        time_t now;
-
+       uint32_t fps;
+       
        switch_assert(session);
        
        if (!(smh = session->media_handle)) {
@@ -333,7 +334,10 @@ SWITCH_DECLARE(uint32_t) switch_core_media_get_video_fps(switch_core_session_t *
                return 0;
        }
        
-       return switch_round_to_step(smh->vid_frames / (now - smh->vid_started), 5);
+       fps = switch_round_to_step(smh->vid_frames / (now - smh->vid_started), 5);
+       if (fps < 15) fps = 15;
+
+       return fps;
 }
 
 SWITCH_DECLARE(void) switch_core_media_pass_zrtp_hash2(switch_core_session_t *aleg_session, switch_core_session_t *bleg_session)