mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
try to refine hls, always flush video when reap segment.
This commit is contained in:
parent
5a3cd235fd
commit
b8d4f68a69
1 changed files with 1 additions and 12 deletions
|
@ -309,12 +309,6 @@ int SrsHlsMuxer::flush_audio(SrsMpegtsFrame* af, SrsSimpleBuffer* ab)
|
|||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
// if flushed yet, ignore.
|
||||
if (ab->length() == 0) {
|
||||
srs_info("ignore hls segment audio flushed yet.");
|
||||
return ret;
|
||||
}
|
||||
|
||||
// if current is NULL, segment is not open, ignore the flush event.
|
||||
if (!current) {
|
||||
srs_warn("flush audio ignored, for segment is not open.");
|
||||
|
@ -342,12 +336,6 @@ int SrsHlsMuxer::flush_video(SrsMpegtsFrame* /*af*/, SrsSimpleBuffer* /*ab*/, Sr
|
|||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
// if flushed yet, ignore.
|
||||
if (vb->length() == 0) {
|
||||
srs_info("ignore hls segment video flushed yet.");
|
||||
return ret;
|
||||
}
|
||||
|
||||
// if current is NULL, segment is not open, ignore the flush event.
|
||||
if (!current) {
|
||||
srs_warn("flush video ignored, for segment is not open.");
|
||||
|
@ -762,6 +750,7 @@ int SrsHlsCache::write_video(SrsAvcAacCodec* codec, SrsHlsMuxer* muxer, int64_t
|
|||
if ((ret = reap_segment("video", muxer, cache->vf->dts)) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
// flush video when got one
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue