Skip to content

Commit

Permalink
for #512, make the segment more acceptable, when in [min, max_td * 2]…
Browse files Browse the repository at this point in the history
…, it's ok.
  • Loading branch information
winlinvip committed Oct 27, 2015
1 parent d1979c7 commit 3b0bf1e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion trunk/src/app/srs_app_hls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,8 @@ int SrsHlsMuxer::segment_close(string log_desc)
// valid, add to segments if segment duration is ok
// when too small, it maybe not enough data to play.
// when too large, it maybe timestamp corrupt.
if (current->duration * 1000 >= SRS_AUTO_HLS_SEGMENT_MIN_DURATION_MS && (int)current->duration <= max_td) {
// make the segment more acceptable, when in [min, max_td * 2], it's ok.
if (current->duration * 1000 >= SRS_AUTO_HLS_SEGMENT_MIN_DURATION_MS && (int)current->duration <= max_td * 2) {
segments.push_back(current);

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

0 comments on commit 3b0bf1e

Please sign in to comment.