1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Fix #2068, losing of last HLS ts file 4.0.133

fix bug: last segment of ts not trigger 'on_hls',
because of 'on_unpublish' earlier than 'segment_close' (#2438)
This commit is contained in:
Xiaoniu 2021-06-28 07:25:25 +08:00 committed by winlin
parent aa12251084
commit 7bf03ef2ba
3 changed files with 6 additions and 5 deletions

View file

@ -6,6 +6,7 @@ The changelog for SRS.
## SRS 4.0 Changelog ## SRS 4.0 Changelog
* v4.0, 2021-06-28, Merge [#2438](https://github.com/ossrs/srs/pull/2438), fix losing of last HLS ts file 4.0.133
* v4.0, 2021-06-27, Squash for [#2424](https://github.com/ossrs/srs/issues/2424), query the latest available version. 4.0.132 * v4.0, 2021-06-27, Squash for [#2424](https://github.com/ossrs/srs/issues/2424), query the latest available version. 4.0.132
* v4.0, 2021-06-24, Merge [#2429](https://github.com/ossrs/srs/pull/2429) to fix SRT bug. 4.0.131 * v4.0, 2021-06-24, Merge [#2429](https://github.com/ossrs/srs/pull/2429) to fix SRT bug. 4.0.131
* v4.0, 2021-06-21, Fix [#2413](https://github.com/ossrs/srs/issues/2413), fix RTMP to RTC bug 4.0.130 * v4.0, 2021-06-21, Fix [#2413](https://github.com/ossrs/srs/issues/2413), fix RTMP to RTC bug 4.0.130

View file

@ -923,10 +923,6 @@ srs_error_t SrsHlsController::on_unpublish()
{ {
srs_error_t err = srs_success; 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) { if ((err = muxer->flush_audio(tsmc)) != srs_success) {
return srs_error_wrap(err, "hls: flush audio"); return srs_error_wrap(err, "hls: flush audio");
} }
@ -934,6 +930,10 @@ srs_error_t SrsHlsController::on_unpublish()
if ((err = muxer->segment_close()) != srs_success) { if ((err = muxer->segment_close()) != srs_success) {
return srs_error_wrap(err, "hls: segment close"); return srs_error_wrap(err, "hls: segment close");
} }
if ((err = muxer->on_unpublish()) != srs_success) {
return srs_error_wrap(err, "muxer unpublish");
}
return err; return err;
} }

View file

@ -9,6 +9,6 @@
#define VERSION_MAJOR 4 #define VERSION_MAJOR 4
#define VERSION_MINOR 0 #define VERSION_MINOR 0
#define VERSION_REVISION 132 #define VERSION_REVISION 133
#endif #endif