1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-15 04:42:04 +00:00

for #512, make the segment more acceptable, when in [min, max_td * 2], it's ok.

This commit is contained in:
winlin 2015-10-27 18:20:57 +08:00
parent d1979c760f
commit 3b0bf1e10b

View file

@ -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.