Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 96f2c38a56fb640ae23a1c60b9f0e1ff58b8c551
      
https://github.com/WebKit/WebKit/commit/96f2c38a56fb640ae23a1c60b9f0e1ff58b8c551
  Author: Philippe Normand <[email protected]>
  Date:   2026-05-11 (Mon, 11 May 2026)

  Changed paths:
    A 
LayoutTests/media/media-source/media-source-real-play-after-eos-expected.txt
    A LayoutTests/media/media-source/media-source-real-play-after-eos.html
    M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
    M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h
    M Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp
    M Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h
    M 
Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp
    M 
Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h
    M 
Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.cpp
    M 
Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp
    M 
Source/WebCore/platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp

  Log Message:
  -----------
  [GStreamer][MSE] Tear down the pipeline upon EOS notification and re-create 
it when the MediaSource un-marks its EOS flag
https://bugs.webkit.org/show_bug.cgi?id=313814

Reviewed by Xabier Rodriguez-Calvar.

Without this patch the following sequence of events would lead to a GStreamer 
error in the MSE
playback pipeline where we would attempt to push a buffer downstream after EOS 
was previously
pushed:

- appendBuffer()
- let the segment play until EOS
- appendBuffer()
- play

The proposed solution is to dispose the internal MSE playback pipeline after 
EOS has been received.
If playback is requested again, the pipeline is re-created from scratch. The 
previous workarounds
related with "setEosWithNoBuffers" are then no longer needed and can be removed.

Test: media/media-source/media-source-real-play-after-eos.html

* LayoutTests/media/media-source/media-source-real-play-after-eos-expected.txt: 
Added.
* LayoutTests/media/media-source/media-source-real-play-after-eos.html: Added.
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::tearDown):
(WebCore::MediaPlayerPrivateGStreamer::load):
(WebCore::MediaPlayerPrivateGStreamer::timeChanged):
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
(WebCore::MediaPlayerPrivateGStreamer::cdmInstanceAttached):
(WebCore::MediaPlayerPrivateGStreamer::cdmInstanceDetached):
(WebCore::MediaPlayerPrivateGStreamer::handleSyncErrorMessage): Deleted.
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
* Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
(WebCore::TrackPrivateBaseGStreamer::~TrackPrivateBaseGStreamer):
* Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
* 
Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
(WebCore::MediaPlayerPrivateGStreamerMSE::load):
(WebCore::MediaPlayerPrivateGStreamerMSE::play):
(WebCore::MediaPlayerPrivateGStreamerMSE::pause):
(WebCore::MediaPlayerPrivateGStreamerMSE::seekToTarget):
(WebCore::MediaPlayerPrivateGStreamerMSE::doSeek):
(WebCore::MediaPlayerPrivateGStreamerMSE::didPreroll):
(WebCore::MediaPlayerPrivateGStreamerMSE::didEnd):
(WebCore::MediaPlayerPrivateGStreamerMSE::updateStates):
(WebCore::MediaPlayerPrivateGStreamerMSE::rebuildPipeline):
(WebCore::MediaPlayerPrivateGStreamerMSE::setEosWithNoBuffers): Deleted.
* 
Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:
* 
Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.cpp:
(WebCore::MediaSourcePrivateGStreamer::markEndOfStream):
(WebCore::MediaSourcePrivateGStreamer::unmarkEndOfStream):
* 
Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp:
(WebCore::SourceBufferPrivateGStreamer::flush):
* Source/WebCore/platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:
(webKitMediaSrcLoop):

Canonical link: https://commits.webkit.org/312998@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to