diff options
author | dalecurtis@chromium.org <dalecurtis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-04 19:50:05 +0000 |
---|---|---|
committer | dalecurtis@chromium.org <dalecurtis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-04 19:50:05 +0000 |
commit | 8c64991a5c2d7e3cb61ed79340676dc9c4a03047 (patch) | |
tree | 3bb7d95d00eeba97b14f776dbbe74585b51e9926 /media/filters | |
parent | 6ee22c81d553588dc8ff42e5cd18c4ca1f00e416 (diff) | |
download | chromium_src-8c64991a5c2d7e3cb61ed79340676dc9c4a03047.zip chromium_src-8c64991a5c2d7e3cb61ed79340676dc9c4a03047.tar.gz chromium_src-8c64991a5c2d7e3cb61ed79340676dc9c4a03047.tar.bz2 |
Disable splice frames for codecs other than mp3 or vorbis.
CHECK failure crashes are still happening sadly, so reduce the
scope of splice frame support.
Vorbis isn't widely used with MSE except for YT experiments and
MP3 has no shipping customers yet. So this should be narrow
enough to minimize crashes while I triage. If not I'll reduce
scope to just MP3 for the M36 release.
BUG=356073,369204
TEST=unittests still pass.
TBR=acolwell
Review URL: https://codereview.chromium.org/268033003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268122 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/filters')
-rw-r--r-- | media/filters/chunk_demuxer.cc | 10 | ||||
-rw-r--r-- | media/filters/chunk_demuxer.h | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/media/filters/chunk_demuxer.cc b/media/filters/chunk_demuxer.cc index 5568703f..fc60f27 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_)); diff --git a/media/filters/chunk_demuxer.h b/media/filters/chunk_demuxer.h index 579f821..2ca89d6 100644 --- a/media/filters/chunk_demuxer.h +++ b/media/filters/chunk_demuxer.h @@ -121,7 +121,7 @@ class ChunkDemuxerStream : public DemuxerStream { mutable base::Lock lock_; State state_; ReadCB read_cb_; - const bool splice_frames_enabled_; + bool splice_frames_enabled_; bool partial_append_window_trimming_enabled_; DISALLOW_IMPLICIT_CONSTRUCTORS(ChunkDemuxerStream); |