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
parent 6ee22c81
......@@ -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_));
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment