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

Unified Diff: media/renderers/audio_renderer_impl.cc

Issue 2343543002: MSE: Replace crossfade splicing overlap trimming. (Closed)
Patch Set: Created 4 years, 3 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/renderers/audio_renderer_impl.cc
diff --git a/media/renderers/audio_renderer_impl.cc b/media/renderers/audio_renderer_impl.cc
index 3d24cf6508bc8a10518b0d60f94b4658755d7579..fe6972369aecb056c2537791d99ec5314d48b942 100644
--- a/media/renderers/audio_renderer_impl.cc
+++ b/media/renderers/audio_renderer_impl.cc
@@ -786,11 +786,11 @@ int AudioRendererImpl::Render(AudioBus* audio_bus,
return 0;
}
- // Delay playback by writing silence if we haven't reached the first
- // timestamp yet; this can occur if the video starts before the audio.
if (algorithm_->frames_buffered() > 0) {
- CHECK_NE(first_packet_timestamp_, kNoTimestamp);
CHECK_GE(first_packet_timestamp_, base::TimeDelta());
+
+ // Delay playback by writing silence if we haven't reached the first
+ // timestamp yet; this can occur if the video starts before the audio.
const base::TimeDelta play_delay =
first_packet_timestamp_ - audio_clock_->back_timestamp();
if (play_delay > base::TimeDelta()) {

Powered by Google App Engine
This is Rietveld 408576698