The root of the problem is that FrameProcessor, not MseTrackBuffer, caches audio-config and audio-preroll-buffer at the level of the stream, not at the level of (one of potentially multiple) audio track.
Additionally, the plumbing from SourceBufferState::OnNewConfigs() -> FrameProcessor::OnPossibleAudioConfigUpdate similarly needs to include with *which* track the config is associated, and the cached |sample_duration_| for use in FrameProcessor::HandlePartialAppendWindowTrimming() needs the track-specific-sample_duration_.
Without these fixes, gapless audio based on appendWindow trimming, is *broken* for any MSE SourceBuffer containing more than 1 audio track.
(I found this while code-reviewing my own stuff related to fixing signalling for PTS/DTS compliance..)
Comment 1 by wolenetz@chromium.org
, Jul 13 2017Status: Started (was: Available)