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

Unified Diff: media/filters/frame_processor.cc

Issue 294393002: MSE: Allow fully discarding frames with resulting timestamps below 0 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
« no previous file with comments | « no previous file | media/filters/frame_processor_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/frame_processor.cc
diff --git a/media/filters/frame_processor.cc b/media/filters/frame_processor.cc
index 7f83a226b75cb9ad3165a81c115c72d1371e3510..706830cc5c434f969ac1eeb49b891d7d335cb11c 100644
--- a/media/filters/frame_processor.cc
+++ b/media/filters/frame_processor.cc
@@ -236,19 +236,6 @@ bool FrameProcessor::ProcessFrame(scoped_refptr<StreamParserBuffer> frame,
}
}
- // 8. If the presentation timestamp or decode timestamp is less than the
- // presentation start time, then run the end of stream algorithm with the
- // error parameter set to "decode", and abort these steps.
- if (presentation_timestamp < base::TimeDelta() ||
- decode_timestamp < base::TimeDelta()) {
- DVLOG(2) << __FUNCTION__
- << ": frame PTS=" << presentation_timestamp.InSecondsF()
- << " or DTS=" << decode_timestamp.InSecondsF()
- << " negative after applying timestampOffset and handling any "
- << " discontinuity";
- return false;
- }
-
// 9. Let frame end timestamp equal the sum of presentation timestamp and
// frame duration.
base::TimeDelta frame_end_timestamp = presentation_timestamp +
@@ -304,6 +291,24 @@ bool FrameProcessor::ProcessFrame(scoped_refptr<StreamParserBuffer> frame,
}
}
+ // Note: This step is relocated, versus April 1 spec, to after append window
+ // filtering to allow more than 1 full frame preroll to support gapless
acolwell GONE FROM CHROMIUM 2014/05/24 05:27:36 nit: I don't think this comment needs to be AAC sp
wolenetz 2014/05/27 19:35:14 Done.
+ // AAC beginning at time 0. This relocation verifies only the frames that
+ // survive append window filtering, rather than checking before append
+ // window filtering.
+ // 8. If the presentation timestamp or decode timestamp is less than the
+ // presentation start time, then run the end of stream algorithm with the
+ // error parameter set to "decode", and abort these steps.
+ if (presentation_timestamp < base::TimeDelta() ||
acolwell GONE FROM CHROMIUM 2014/05/24 05:27:36 Yes. I believe the spec should probably be updated
wolenetz 2014/05/27 19:35:14 For PTS, added DCHECK. For DTS < 0: I've added a n
+ decode_timestamp < base::TimeDelta()) {
+ DVLOG(2) << __FUNCTION__
+ << ": frame PTS=" << presentation_timestamp.InSecondsF()
+ << " or DTS=" << decode_timestamp.InSecondsF()
+ << " negative after applying timestampOffset and handling any "
+ << " discontinuity";
+ return false;
+ }
+
// 12. If the need random access point flag on track buffer equals true,
// then run the following steps:
if (track_buffer->needs_random_access_point()) {
@@ -357,9 +362,9 @@ bool FrameProcessor::ProcessFrame(scoped_refptr<StreamParserBuffer> frame,
// 22. If frame end timestamp is greater than group end timestamp, then set
// group end timestamp equal to frame end timestamp.
- DCHECK(group_end_timestamp_ >= base::TimeDelta());
if (frame_end_timestamp > group_end_timestamp_)
group_end_timestamp_ = frame_end_timestamp;
+ DCHECK(group_end_timestamp_ >= base::TimeDelta());
return true;
}
« no previous file with comments | « no previous file | media/filters/frame_processor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698