Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Unified Diff: media/formats/mp2t/ts_section_pes.cc

Issue 447963003: Introduce DecodeTimestamp class to make it easier to distiguish presentation and decode timestamps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/formats/mp2t/ts_section_pes.cc
diff --git a/media/formats/mp2t/ts_section_pes.cc b/media/formats/mp2t/ts_section_pes.cc
index de69a32e63b33e7c8cb5fa4afac631615f2cbbcc..ff9090945b3b6e7803de0a59722ecdce3ce4bddd 100644
--- a/media/formats/mp2t/ts_section_pes.cc
+++ b/media/formats/mp2t/ts_section_pes.cc
@@ -267,7 +267,7 @@ bool TsSectionPes::ParseInternal(const uint8* raw_pes, int raw_pes_size) {
// Convert and unroll the timestamps.
base::TimeDelta media_pts(kNoTimestamp());
- base::TimeDelta media_dts(kNoTimestamp());
+ DecodeTimestamp media_dts(kNoDecodeTimestamp());
if (is_pts_valid) {
int64 pts = ConvertTimestampSectionToTimestamp(pts_section);
if (previous_pts_valid_)
@@ -282,7 +282,7 @@ bool TsSectionPes::ParseInternal(const uint8* raw_pes, int raw_pes_size) {
dts = UnrollTimestamp(previous_dts_, dts);
previous_dts_ = dts;
previous_dts_valid_ = true;
- media_dts = base::TimeDelta::FromMicroseconds((1000 * dts) / 90);
+ media_dts = DecodeTimestamp::FromMicroseconds((1000 * dts) / 90);
}
// Discard the rest of the PES packet header.
@@ -309,4 +309,3 @@ void TsSectionPes::ResetPesState() {
} // namespace mp2t
} // namespace media
-

Powered by Google App Engine
This is Rietveld 408576698