winlin

change HLS audio delay to 100ms. 0.9.153

@@ -74,7 +74,7 @@ using namespace std; @@ -74,7 +74,7 @@ using namespace std;
74 // in ms, for HLS aac sync time. 74 // in ms, for HLS aac sync time.
75 #define SRS_CONF_DEFAULT_AAC_SYNC 100 75 #define SRS_CONF_DEFAULT_AAC_SYNC 100
76 // in ms, for HLS aac flush the audio 76 // in ms, for HLS aac flush the audio
77 -#define SRS_CONF_DEFAULT_AAC_DELAY 300 77 +#define SRS_CONF_DEFAULT_AAC_DELAY 100
78 78
79 // @see: ngx_rtmp_mpegts_header 79 // @see: ngx_rtmp_mpegts_header
80 u_int8_t mpegts_header[] = { 80 u_int8_t mpegts_header[] = {
@@ -1266,13 +1266,13 @@ int SrsHlsCache::cache_video(SrsAvcAacCodec* codec, SrsCodecSample* sample) @@ -1266,13 +1266,13 @@ int SrsHlsCache::cache_video(SrsAvcAacCodec* codec, SrsCodecSample* sample)
1266 if (nal_unit_type == 1 || nal_unit_type == 5 || nal_unit_type == 6) { 1266 if (nal_unit_type == 1 || nal_unit_type == 5 || nal_unit_type == 6) {
1267 // for type 6, append a aud with type 9. 1267 // for type 6, append a aud with type 9.
1268 vb->append(aud_nal, sizeof(aud_nal)); 1268 vb->append(aud_nal, sizeof(aud_nal));
  1269 + aud_sent = true;
1269 } 1270 }
1270 } 1271 }
1271 1272
1272 // 5: Coded slice of an IDR picture. 1273 // 5: Coded slice of an IDR picture.
1273 // insert sps/pps before IDR or key frame is ok. 1274 // insert sps/pps before IDR or key frame is ok.
1274 if (nal_unit_type == 5 && !sps_pps_sent) { 1275 if (nal_unit_type == 5 && !sps_pps_sent) {
1275 - //if (vf->key && !sps_pps_sent) {  
1276 sps_pps_sent = true; 1276 sps_pps_sent = true;
1277 1277
1278 // @see: ngx_rtmp_hls_append_sps_pps 1278 // @see: ngx_rtmp_hls_append_sps_pps
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 // current release version 31 // current release version
32 #define VERSION_MAJOR "0" 32 #define VERSION_MAJOR "0"
33 #define VERSION_MINOR "9" 33 #define VERSION_MINOR "9"
34 -#define VERSION_REVISION "152" 34 +#define VERSION_REVISION "153"
35 #define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION 35 #define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
36 // server info. 36 // server info.
37 #define RTMP_SIG_SRS_KEY "SRS" 37 #define RTMP_SIG_SRS_KEY "SRS"