for #512, make the segment more acceptable, when in [min, max_td * 2], it's ok.
正在显示
1 个修改的文件
包含
2 行增加
和
1 行删除
| @@ -728,7 +728,8 @@ int SrsHlsMuxer::segment_close(string log_desc) | @@ -728,7 +728,8 @@ int SrsHlsMuxer::segment_close(string log_desc) | ||
| 728 | // valid, add to segments if segment duration is ok | 728 | // valid, add to segments if segment duration is ok |
| 729 | // when too small, it maybe not enough data to play. | 729 | // when too small, it maybe not enough data to play. |
| 730 | // when too large, it maybe timestamp corrupt. | 730 | // 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) { | ||
| 732 | segments.push_back(current); | 733 | segments.push_back(current); |
| 733 | 734 | ||
| 734 | // use async to call the http hooks, for it will cause thread switch. | 735 | // use async to call the http hooks, for it will cause thread switch. |
-
请 注册 或 登录 后发表评论