From 2a36066ea0f7ba7174ad511d60899b46e5b3aa1c Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 20 Apr 2015 15:35:03 -0500 Subject: [PATCH] FS-7500: make 15fps the min detected speed --- src/switch_core_media.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/switch_core_media.c b/src/switch_core_media.c index 877f6ee487..0b928bd4f1 100644 --- a/src/switch_core_media.c +++ b/src/switch_core_media.c @@ -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)