diff --git a/trunk/src/app/srs_app_dash.hpp b/trunk/src/app/srs_app_dash.hpp index 48dadd440..88f9c8489 100644 --- a/trunk/src/app/srs_app_dash.hpp +++ b/trunk/src/app/srs_app_dash.hpp @@ -129,7 +129,7 @@ private: uint64_t audio_dts; uint64_t video_dts; private: - // The fragment duration in ms to reap it. + // The fragment duration in srs_utime_t to reap it. srs_utime_t fragment; private: std::string home; diff --git a/trunk/src/app/srs_app_fragment.cpp b/trunk/src/app/srs_app_fragment.cpp index 661ac3444..efadb9022 100644 --- a/trunk/src/app/srs_app_fragment.cpp +++ b/trunk/src/app/srs_app_fragment.cpp @@ -53,12 +53,12 @@ void SrsFragment::append(int64_t dts) } if (start_dts == -1) { - start_dts = dts; + start_dts = dts * SRS_UTIME_MILLISECONDS; } // TODO: FIXME: Use cumulus dts. - start_dts = srs_min(start_dts, dts); - dur = srs_utime_t(dts - start_dts) * SRS_UTIME_MILLISECONDS; + start_dts = srs_min(start_dts, dts * SRS_UTIME_MILLISECONDS); + dur = dts - start_dts; } srs_utime_t SrsFragment::duration() diff --git a/trunk/src/app/srs_app_fragment.hpp b/trunk/src/app/srs_app_fragment.hpp index 0e70adf2e..c06add374 100644 --- a/trunk/src/app/srs_app_fragment.hpp +++ b/trunk/src/app/srs_app_fragment.hpp @@ -40,8 +40,8 @@ private: srs_utime_t dur; // The full file path of fragment. std::string filepath; - // The start DTS in ms of segment. - int64_t start_dts; + // The start DTS in srs_utime_t of segment. + srs_utime_t start_dts; // Whether current segement contains sequence header. bool sequence_header; public: