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

change HLS audio delay to 100ms. 0.9.153

This commit is contained in:
winlin 2014-07-06 14:28:05 +08:00
parent f895523ac6
commit dc7b952043
2 changed files with 3 additions and 3 deletions

View file

@ -74,7 +74,7 @@ using namespace std;
// in ms, for HLS aac sync time. // in ms, for HLS aac sync time.
#define SRS_CONF_DEFAULT_AAC_SYNC 100 #define SRS_CONF_DEFAULT_AAC_SYNC 100
// in ms, for HLS aac flush the audio // in ms, for HLS aac flush the audio
#define SRS_CONF_DEFAULT_AAC_DELAY 300 #define SRS_CONF_DEFAULT_AAC_DELAY 100
// @see: ngx_rtmp_mpegts_header // @see: ngx_rtmp_mpegts_header
u_int8_t mpegts_header[] = { u_int8_t mpegts_header[] = {
@ -1266,13 +1266,13 @@ int SrsHlsCache::cache_video(SrsAvcAacCodec* codec, SrsCodecSample* sample)
if (nal_unit_type == 1 || nal_unit_type == 5 || nal_unit_type == 6) { if (nal_unit_type == 1 || nal_unit_type == 5 || nal_unit_type == 6) {
// for type 6, append a aud with type 9. // for type 6, append a aud with type 9.
vb->append(aud_nal, sizeof(aud_nal)); vb->append(aud_nal, sizeof(aud_nal));
aud_sent = true;
} }
} }
// 5: Coded slice of an IDR picture. // 5: Coded slice of an IDR picture.
// insert sps/pps before IDR or key frame is ok. // insert sps/pps before IDR or key frame is ok.
if (nal_unit_type == 5 && !sps_pps_sent) { if (nal_unit_type == 5 && !sps_pps_sent) {
//if (vf->key && !sps_pps_sent) {
sps_pps_sent = true; sps_pps_sent = true;
// @see: ngx_rtmp_hls_append_sps_pps // @see: ngx_rtmp_hls_append_sps_pps

View file

@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version // current release version
#define VERSION_MAJOR "0" #define VERSION_MAJOR "0"
#define VERSION_MINOR "9" #define VERSION_MINOR "9"
#define VERSION_REVISION "152" #define VERSION_REVISION "153"
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION #define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
// server info. // server info.
#define RTMP_SIG_SRS_KEY "SRS" #define RTMP_SIG_SRS_KEY "SRS"