Skip to content

Commit

Permalink
fix bug: last segment of ts not trigger 'on_hls', because of 'on_unpu…
Browse files Browse the repository at this point in the history
…blish' earlier than 'segment_close' (#2438)
  • Loading branch information
Xiaoniu authored Jun 27, 2021
1 parent ce47d5c commit d987e19
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions trunk/src/app/srs_app_hls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -923,17 +923,17 @@ srs_error_t SrsHlsController::on_unpublish()
{
srs_error_t err = srs_success;

if ((err = muxer->on_unpublish()) != srs_success) {
return srs_error_wrap(err, "muxer unpublish");
}

if ((err = muxer->flush_audio(tsmc)) != srs_success) {
return srs_error_wrap(err, "hls: flush audio");
}

if ((err = muxer->segment_close()) != srs_success) {
return srs_error_wrap(err, "hls: segment close");
}

if ((err = muxer->on_unpublish()) != srs_success) {
return srs_error_wrap(err, "muxer unpublish");
}

return err;
}
Expand Down

0 comments on commit d987e19

Please sign in to comment.