Skip to content

Commit 3b0bf1e

Browse files
committed
for #512, make the segment more acceptable, when in [min, max_td * 2], it's ok.
1 parent d1979c7 commit 3b0bf1e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

trunk/src/app/srs_app_hls.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,8 @@ int SrsHlsMuxer::segment_close(string log_desc)
728728
// valid, add to segments if segment duration is ok
729729
// when too small, it maybe not enough data to play.
730730
// when too large, it maybe timestamp corrupt.
731-
if (current->duration * 1000 >= SRS_AUTO_HLS_SEGMENT_MIN_DURATION_MS && (int)current->duration <= max_td) {
731+
// make the segment more acceptable, when in [min, max_td * 2], it's ok.
732+
if (current->duration * 1000 >= SRS_AUTO_HLS_SEGMENT_MIN_DURATION_MS && (int)current->duration <= max_td * 2) {
732733
segments.push_back(current);
733734

734735
// use async to call the http hooks, for it will cause thread switch.

0 commit comments

Comments
 (0)