From 41d1e915404ae1a7f0649d0e3398bd204b72f799 Mon Sep 17 00:00:00 2001 From: winlin Date: Fri, 12 Apr 2019 10:00:39 +0800 Subject: [PATCH] Fix start and end time bug --- trunk/src/app/srs_app_source.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/trunk/src/app/srs_app_source.cpp b/trunk/src/app/srs_app_source.cpp index f38266c36..8944af271 100755 --- a/trunk/src/app/srs_app_source.cpp +++ b/trunk/src/app/srs_app_source.cpp @@ -274,7 +274,7 @@ srs_error_t SrsMessageQueue::enqueue(SrsSharedPtrMessage* msg, bool* is_overflow av_start_time = srs_utime_t(msg->timestamp * SRS_UTIME_MILLISECONDS); } - av_end_time = msg->timestamp; + av_end_time = srs_utime_t(msg->timestamp * SRS_UTIME_MILLISECONDS); } msgs.push_back(msg); @@ -375,11 +375,11 @@ void SrsMessageQueue::shrink() av_start_time = av_end_time; //push_back secquence header and update timestamp if (video_sh) { - video_sh->timestamp = av_end_time; + video_sh->timestamp = srsu2ms(av_end_time); msgs.push_back(video_sh); } if (audio_sh) { - audio_sh->timestamp = av_end_time; + audio_sh->timestamp = srsu2ms(av_end_time); msgs.push_back(audio_sh); }