From 3c9603af13d613f7b3454f6dd224062e5372adfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Cantar=C3=ADn?= Date: Sat, 1 Feb 2020 23:37:26 -0300 Subject: [PATCH] Fix timestamp truncated to 32 bits in TS segment with $Time$ in template Fixes #701. --- AUTHORS | 1 + CONTRIBUTORS | 1 + packager/media/formats/mp2t/ts_segmenter.cc | 2 +- packager/media/formats/mp2t/ts_segmenter.h | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index d2bdbd68e2..95b23e51f2 100644 --- a/AUTHORS +++ b/AUTHORS @@ -15,6 +15,7 @@ Anders Hasselqvist Chun-da Chen +Daniel CantarĂ­n Google Inc. <*@google.com> Leandro Moreira Leo Law diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 3bdbfc1a95..3d9c544fb4 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -25,6 +25,7 @@ Anders Hasselqvist Bei Li Chun-da Chen +Daniel CantarĂ­n David Cavar Gabe Kopley Haoming Chen diff --git a/packager/media/formats/mp2t/ts_segmenter.cc b/packager/media/formats/mp2t/ts_segmenter.cc index 3474ec1a6c..aaea5ced17 100644 --- a/packager/media/formats/mp2t/ts_segmenter.cc +++ b/packager/media/formats/mp2t/ts_segmenter.cc @@ -125,7 +125,7 @@ void TsSegmenter::SetTsWriterFileOpenedForTesting(bool value) { ts_writer_file_opened_ = value; } -Status TsSegmenter::OpenNewSegmentIfClosed(uint32_t next_pts) { +Status TsSegmenter::OpenNewSegmentIfClosed(int64_t next_pts) { if (ts_writer_file_opened_) return Status::OK; const std::string segment_name = diff --git a/packager/media/formats/mp2t/ts_segmenter.h b/packager/media/formats/mp2t/ts_segmenter.h index 78a88d2213..b140040eb7 100644 --- a/packager/media/formats/mp2t/ts_segmenter.h +++ b/packager/media/formats/mp2t/ts_segmenter.h @@ -71,7 +71,7 @@ class TsSegmenter { void SetTsWriterFileOpenedForTesting(bool value); private: - Status OpenNewSegmentIfClosed(uint32_t next_pts); + Status OpenNewSegmentIfClosed(int64_t next_pts); // Writes PES packets (carried in TsPackets) to a file. If a file is not open, // it will open one. This will not close the file.