Bug 220055

Summary: [MSE] Fix allSamplesInTrackEnqueued() handling
Product: WebKit Reporter: Alicia Boya García <aboya>
Component: MediaAssignee: Alicia Boya García <aboya>
Status: RESOLVED FIXED    
Severity: Normal CC: calvaris, eric.carlson, ews-watchlist, glenn, jer.noble, peng.liu6, philipj, pnormand, sergio, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=219822
Attachments:
Description Flags
Patch
none
Patch ews-feeder: commit-queue-

Description Alicia Boya García 2020-12-21 07:36:03 PST
Within the changes introduced by r270612 a spurious call to
allSamplesInTrackEnqueued() was added to provideMediaData().

provideMediaData() is called every time there may be new samples that
need to be enqueued into the playback pipeline.

allSamplesInTrackEnqueued() is supposed to be called when
MediaSource.endOfStream() has been called and all pending samples have
been enqueued, therefore signaling the playback pipeline that no more
samples will be added.

Some decoders need to be notified of this condition in order to move
the last samples in their queue downstream. This is true at least of
the avdec (ffmpeg) decoders that are commonly used in desktop versions
of the GStreamer port.

Calling allSamplesInTrackEnqueued() prematurely will mess with the
playback as the code will not accept any more samples, a serious
problem. This patch fixes it by removing the spurious call and
restoring its original purpose when it was introduced in r230909.
Comment 1 Alicia Boya García 2020-12-21 07:47:09 PST
Created attachment 416601 [details]
Patch
Comment 2 Philippe Normand 2020-12-21 07:51:07 PST
Comment on attachment 416601 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=416601&action=review

> Source/WebKit/ChangeLog:19
> +2020-12-21  Alicia Boya García  <aboya@igalia.com>

Duplicate ChangeLog here
Comment 3 Alicia Boya García 2020-12-21 08:46:35 PST
Created attachment 416604 [details]
Patch
Comment 4 EWS 2020-12-21 10:14:34 PST
Committed r271024: <https://trac.webkit.org/changeset/271024>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 416604 [details].
Comment 5 Radar WebKit Bug Importer 2020-12-21 10:15:52 PST
<rdar://problem/72553924>