Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: aa09557dfddc2a32fe6c10f9c5e756b9cea48f61
      
https://github.com/WebKit/WebKit/commit/aa09557dfddc2a32fe6c10f9c5e756b9cea48f61
  Author: Alicia Boya Garcia <[email protected]>
  Date:   2025-01-31 (Fri, 31 Jan 2025)

  Changed paths:
    M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
    M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h
    M 
Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp

  Log Message:
  -----------
  [GStreamer] Handle pre-roll in setVisibleInViewport()
https://bugs.webkit.org/show_bug.cgi?id=286750

Reviewed by Philippe Normand.

Inside the player suspension code in setVisibleInViewport(), the
pipeline state is saved so that the pipeline can be set back to it when
later resuming.

However, the existing code was using the current state instead of the
target state. As a consequence, if the pipeline was still prerolling,
the pipeline would be set to READY instead of PAUSED on resume.

This patch fixes that issue by reading both the current and pending
state, and using the pending state if not VOID_PENDING.

Removing this unexpected transition to READY has reduced the amount of
crashes in presence of muted video and scrolling; however, I wouldn't go
so far as blaming the crashes on this bug, as changing the pipeline
state should not crash the pipeline.

* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::cancelLoad):
(WebCore::MediaPlayerPrivateGStreamer::loadNextLocation):
(WebCore::MediaPlayerPrivateGStreamer::setVisibleInViewport):
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
* 
Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
(WebCore::MediaPlayerPrivateGStreamerMSE::setEosWithNoBuffers):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to