New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 782934 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

RemovedFromMediaSource (and perhaps MSE + HTMLMediaElement specs) doesn 't explicitly shut down streams

Project Member Reported by wolenetz@chromium.org, Nov 8 2017

Issue description

When MediaSource is transitioning to 'closed' readyState, or when the MSE app makes a valid removeSourceBuffer() call, and the tracks associated with the SourceBuffer(s) have enabled audio track(s) or selected video track, then the specs appear to leave the state of the media element with respect to continued rendering of previously buffered media a bit underdefined.

This bug tracks investigation of specs and impl to clarify intended behavior.
 
In RemovedFromMediaSource implementation, I don't see where servolk@'s comment at https://chromium.googlesource.com/chromium/src/+/eee7cb628ad1f62544b6b4f95f0a2f72447673b0/media/filters/chunk_demuxer.h#468 is done (I don't see where such a track is made to be in shutdown state and return EOS).
When a SourceBuffer is removed from MediaSource the flow goes:
WebSourceBufferImpl::RemovedFromMediaSource -> ChunkDemuxer::RemoveId (which destroys the corresponding SourceBufferState by removing it from the map at https://cs.chromium.org/chromium/src/media/filters/chunk_demuxer.cc?rcl=905e5b5cd96bfd7dd5b51525cad1d398c7850f10&l=721) -> ~SourceBufferState -> SourceBufferState::Shutdown, which puts all streams/tracks owned by that SourceBuffer[State] into SHUTDOWN state. And when a track is in SHUTDOWN state the EOS for reads is returned here:
https://cs.chromium.org/chromium/src/media/filters/chunk_demuxer.cc?rcl=905e5b5cd96bfd7dd5b51525cad1d398c7850f10&l=436
Ah that makes sense. And even better, it's not conditioned on any flag (even if on-by-default) like kBackgroundVideoTrackOptimization or media tracks enabled. Thanks for the rapid response, servolk@.

Status: WontFix (was: Assigned)

Sign in to add a comment