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

Unified Diff: media/filters/chunk_demuxer.cc

Issue 278673003: Enable splice frames and partial appends for AAC; with test! (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Update hash. 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/pipeline_integration_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/chunk_demuxer.cc
diff --git a/media/filters/chunk_demuxer.cc b/media/filters/chunk_demuxer.cc
index a852031dc6a80a442c5862c17497835053505224..d9e116536c87d900814ece83d83788646c5830f5 100644
--- a/media/filters/chunk_demuxer.cc
+++ b/media/filters/chunk_demuxer.cc
@@ -860,15 +860,13 @@ bool ChunkDemuxerStream::UpdateAudioConfig(const AudioDecoderConfig& config,
DCHECK_EQ(state_, UNINITIALIZED);
// On platforms which support splice frames, enable splice frames and
- // partial append window support for a limited set of codecs.
- // TODO(dalecurtis): Verify this works for codecs other than MP3 and Vorbis.
- // Right now we want to be extremely conservative to ensure we don't break
- // the world.
- const bool mp3_or_vorbis =
- config.codec() == kCodecMP3 || config.codec() == kCodecVorbis;
- splice_frames_enabled_ = splice_frames_enabled_ && mp3_or_vorbis;
+ // partial append window support for most codecs (notably: not opus).
+ const bool codec_supported = config.codec() == kCodecMP3 ||
+ config.codec() == kCodecAAC ||
+ config.codec() == kCodecVorbis;
+ splice_frames_enabled_ = splice_frames_enabled_ && codec_supported;
partial_append_window_trimming_enabled_ =
- splice_frames_enabled_ && mp3_or_vorbis;
+ splice_frames_enabled_ && codec_supported;
stream_.reset(
new SourceBufferStream(config, log_cb, splice_frames_enabled_));
« no previous file with comments | « no previous file | media/filters/pipeline_integration_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698