diff --git a/hls/ngx_rtmp_dash_module.c b/hls/ngx_rtmp_dash_module.c index c30a381..31f6a44 100644 --- a/hls/ngx_rtmp_dash_module.c +++ b/hls/ngx_rtmp_dash_module.c @@ -209,19 +209,19 @@ ngx_rtmp_dash_write_playlist(ngx_rtmp_session_t *s) #define NGX_RTMP_DASH_MANIFEST_HEADER \ "\n"\ - "\n"\ - " \n" + "\n"\ + " \n" #define NGX_RTMP_DASH_MANIFEST_VIDEO \ " \n"\ " \n"\ - " \n"\ + " \n"\ " \n"\ " \n" #define NGX_RTMP_DASH_MANIFEST_AUDIO \ " \n"\ " \n"\ " \n"\ - " \n"\ + " \n"\ " \n"\ " \n" #define NGX_RTMP_DASH_MANIFEST_FOOTER \ @@ -246,6 +246,7 @@ ngx_rtmp_dash_write_playlist(ngx_rtmp_session_t *s) codec_ctx->height, codec_ctx->frame_rate, (uint32_t)(live_ctx->stream->bw_in.bandwidth*8), + f->video_earliest_pres_time, f->id > 0 ? (uint32_t)(f->video_latest_pres_time/f->id) : hacf->fraglen, &ctx->name, &ctx->name); @@ -255,6 +256,7 @@ ngx_rtmp_dash_write_playlist(ngx_rtmp_session_t *s) if (ctx->audio) { p = ngx_snprintf(buffer, sizeof(buffer), NGX_RTMP_DASH_MANIFEST_AUDIO, codec_ctx->sample_rate, + (uint32_t)(f->audio_earliest_pres_time*((float)codec_ctx->sample_rate/1000.0)), codec_ctx->sample_rate, audio_dur, &ctx->name,