mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Merge branch '2.0release' into develop
This commit is contained in:
commit
a1ae48f4ac
4 changed files with 67 additions and 119 deletions
|
@ -1070,11 +1070,6 @@ int SrsHlsCache::write_video(SrsAvcAacCodec* codec, SrsHlsMuxer* muxer, int64_t
|
|||
// a. wait keyframe and got keyframe.
|
||||
// b. always reap when not wait keyframe.
|
||||
if (!muxer->wait_keyframe() || sample->frame_type == SrsCodecVideoAVCFrameKeyFrame) {
|
||||
// when wait keyframe, there must exists idr frame in sample, or NonIDR(open gop) specified.
|
||||
if (!sample->open_gop && !sample->has_idr && muxer->wait_keyframe()) {
|
||||
srs_warn("hls: ts starts without IDR, first nalu=%d, idr=%d", sample->first_nalu_type, sample->has_idr);
|
||||
}
|
||||
|
||||
// reap the segment, which will also flush the video.
|
||||
if ((ret = reap_segment("video", muxer, cache->video->dts)) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
|
@ -1271,8 +1266,6 @@ void SrsHls::on_unpublish()
|
|||
srs_error("ignore m3u8 muxer flush/close audio failed. ret=%d", ret);
|
||||
}
|
||||
|
||||
sample->reset();
|
||||
|
||||
hls_enabled = false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue