From 4e5ddb51e745b8452cd5bdffd9b28e9f9f74463f Mon Sep 17 00:00:00 2001 From: winlin Date: Tue, 21 Apr 2015 16:21:22 +0800 Subject: [PATCH] refine the overflow algorithm, prevent smaller piece. --- trunk/src/app/srs_app_hls.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trunk/src/app/srs_app_hls.cpp b/trunk/src/app/srs_app_hls.cpp index 74c2a2e76..2577d3fc7 100644 --- a/trunk/src/app/srs_app_hls.cpp +++ b/trunk/src/app/srs_app_hls.cpp @@ -543,7 +543,7 @@ bool SrsHlsMuxer::is_segment_overflow() srs_assert(current); // to prevent very small segment. - if (current->duration < 2 * SRS_AUTO_HLS_SEGMENT_MIN_DURATION_MS) { + if (current->duration * 1000 < 2 * SRS_AUTO_HLS_SEGMENT_MIN_DURATION_MS) { return false; } @@ -566,7 +566,7 @@ bool SrsHlsMuxer::is_segment_absolutely_overflow() srs_assert(current); // to prevent very small segment. - if (current->duration < 2 * SRS_AUTO_HLS_SEGMENT_MIN_DURATION_MS) { + if (current->duration * 1000 < 2 * SRS_AUTO_HLS_SEGMENT_MIN_DURATION_MS) { return false; }