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

Unified Diff: media/filters/chunk_demuxer.cc

Issue 268033003: Disable splice frames for codecs other than mp3 or vorbis. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | « media/filters/chunk_demuxer.h ('k') | no next file » | 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 5568703fe4202963559dcf945a4f72886105df7d..fc60f2710ad0d20aee8c0b52ae9286b026b4ec6b 100644
--- a/media/filters/chunk_demuxer.cc
+++ b/media/filters/chunk_demuxer.cc
@@ -830,14 +830,16 @@ bool ChunkDemuxerStream::UpdateAudioConfig(const AudioDecoderConfig& config,
if (!stream_) {
DCHECK_EQ(state_, UNINITIALIZED);
- // Enable partial append window support for a limited set of codecs and only
- // on platforms that have splice frames enabled.
+ // 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_trimming_enabled_ =
- splice_frames_enabled_ &&
- (config.codec() == kCodecMP3 || config.codec() == kCodecVorbis);
+ splice_frames_enabled_ && mp3_or_vorbis;
stream_.reset(
new SourceBufferStream(config, log_cb, splice_frames_enabled_));
« no previous file with comments | « media/filters/chunk_demuxer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698