Skip to content

Commit

Permalink
try to refine hls, always flush video when reap segment.
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Feb 10, 2015
1 parent 5a3cd23 commit b8d4f68
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions trunk/src/app/srs_app_hls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
Expand Down Expand Up @@ -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.");
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b8d4f68

Please sign in to comment.