mirror of
https://github.com/ossrs/srs.git
synced 2025-02-15 04:42:04 +00:00
refine the overflow algorithm, prevent smaller piece.
This commit is contained in:
parent
1d973e2178
commit
4e5ddb51e7
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue