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

Unified Diff: media/filters/frame_processor.cc

Issue 344513002: MSE: Reduce spurious discontinuities caused by partial append window start overlaps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 3071439f6a0633b6a655ea196b99bd526e993559..68f4c613d81aa4cfe71ed63d52a711a81de98ebb 100644
--- a/media/filters/frame_processor.cc
+++ b/media/filters/frame_processor.cc
@@ -261,13 +261,15 @@ bool FrameProcessor::ProcessFrame(
if (frame->timestamp() != presentation_timestamp && !sequence_mode_)
*new_media_segment = true;
- // |frame| has been partially trimmed or had preroll added.
+ // |frame| has been partially trimmed or had preroll added. Though
+ // |frame|'s duration may have changed, do not update |frame_duration|
+ // here, so |track_buffer|'s last frame duration update uses original
+ // frame duration and reduces spurious discontinuity detection.
decode_timestamp = frame->GetDecodeTimestamp();
presentation_timestamp = frame->timestamp();
- frame_duration = frame->duration();
// The end timestamp of the frame should be unchanged.
- DCHECK(frame_end_timestamp == presentation_timestamp + frame_duration);
+ DCHECK(frame_end_timestamp == presentation_timestamp + frame->duration());
}
if (presentation_timestamp < append_window_start ||
« 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