Fix #1051, Drop ts when republishing stream. 3.0.41

pull/1324/head
winlin 7 years ago
parent 1e054d2bcc
commit e73e30de3a

@ -184,6 +184,7 @@ Please select according to languages:
### V3 changes
* v3.0, 2018-08-25, Fix [#1051][bug #1051], Drop ts when republishing stream. 3.0.41
* v3.0, 2018-08-12, For [#1202][bug #1202], Support edge/forward to Aliyun CDN. 3.0.40
* v3.0, 2018-08-11, For [#910][bug #910], Support HTTP FLV with HTTP callback. 3.0.39
* v3.0, 2018-08-05, Refine HTTP-FLV latency, support realtime mode.3.0.38
@ -1466,6 +1467,7 @@ Winlin
[bug #105]: https://github.com/ossrs/srs/issues/105
[bug #727]: https://github.com/ossrs/srs/issues/727
[bug #1087]: https://github.com/ossrs/srs/issues/1087
[bug #1051]: https://github.com/ossrs/srs/issues/1051
[bug #xxxxxxxxxxxxx]: https://github.com/ossrs/srs/issues/xxxxxxxxxxxxx
[exo #828]: https://github.com/google/ExoPlayer/pull/828

@ -1102,6 +1102,7 @@ srs_error_t SrsHls::on_audio(SrsSharedPtrMessage* shared_audio, SrsFormat* forma
// Use the diff to guess whether the samples is 1024 or 960.
int nb_samples_per_frame = 1024;
int diff = ::abs((int)(audio->timestamp - previous_audio_dts)) * srs_flv_srates[format->acodec->sound_rate];
previous_audio_dts = audio->timestamp;
if (diff > 100 && diff < 950) {
nb_samples_per_frame = 960;
}

@ -27,7 +27,7 @@
// current release version
#define VERSION_MAJOR 3
#define VERSION_MINOR 0
#define VERSION_REVISION 40
#define VERSION_REVISION 41
// generated by configure, only macros.
#include <srs_auto_headers.hpp>

Loading…
Cancel
Save