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

Unified Diff: media/base/audio_splicer.cc

Issue 220103002: Fix unit test failures with estimated durations and splice frames. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix removal of old buffers. Created 6 years, 8 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/chunk_demuxer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/audio_splicer.cc
diff --git a/media/base/audio_splicer.cc b/media/base/audio_splicer.cc
index eac1c4924f6d121078e1cbb268d6e7aecaaa5320..b83765e76066bda8e93840f703371959344a6524 100644
--- a/media/base/audio_splicer.cc
+++ b/media/base/audio_splicer.cc
@@ -44,7 +44,8 @@ static void AccurateTrimStart(int frames_to_trim,
static void AccurateTrimEnd(int frames_to_trim,
const scoped_refptr<AudioBuffer> buffer,
const AudioTimestampHelper& timestamp_helper) {
- DCHECK(buffer->timestamp() == timestamp_helper.GetTimestamp());
+ DCHECK_LT(std::abs(timestamp_helper.GetFramesToTarget(buffer->timestamp())),
+ kMinGapSize);
buffer->TrimEnd(frames_to_trim);
buffer->set_duration(
timestamp_helper.GetFrameDuration(buffer->frame_count()));
« no previous file with comments | « no previous file | media/filters/chunk_demuxer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698