⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 276701 in webkit


Ignore:
Timestamp:
Apr 28, 2021, 2:36:43 AM (5 years ago)
Author:
Adrian Perez de Castro
Message:

Merge r275821 - [MSE][GStreamer] Crash in WebCore::PlaybackPipeline::addSourceBuffer when setting duration and preload is set to none
​https://bugs.webkit.org/show_bug.cgi?id=224260

Patch by Philippe Normand <​pnormand@igalia.com> on 2021-04-12
Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

Disable delayed loading for the GStreamer MSE player, we want the MSE source element to be
configured ASAP, otherwise the playback pipeline will fail in various ways (duration
notifications sent too early, crashes in addSourceBuffer, crashes in attachTracks, and so
on).

Test: media/media-source/media-source-no-preload-set-duration-crash.html

  • platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:

(WebCore::MediaPlayerPrivateGStreamerMSE::durationChanged):

LayoutTests:

  • media/media-source/media-source-no-preload-set-duration-crash-expected.txt: Added.
  • media/media-source/media-source-no-preload-set-duration-crash.html: Added.
Location:
releases/WebKitGTK/webkit-2.32
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • releases/WebKitGTK/webkit-2.32/LayoutTests/ChangeLog

    r275028 r276701  
     12021-04-12  Philippe Normand  <pnormand@igalia.com>
     2
     3        [MSE][GStreamer] Crash in WebCore::PlaybackPipeline::addSourceBuffer when setting duration and preload is set to none
     4        https://bugs.webkit.org/show_bug.cgi?id=224260
     5
     6        Reviewed by Xabier Rodriguez-Calvar.
     7
     8        * media/media-source/media-source-no-preload-set-duration-crash-expected.txt: Added.
     9        * media/media-source/media-source-no-preload-set-duration-crash.html: Added.
     10
    1112021-03-24  Philippe Normand  <pnormand@igalia.com>
    212
  • releases/WebKitGTK/webkit-2.32/Source/WebCore/ChangeLog

    r276173 r276701  
     12021-04-12  Philippe Normand  <pnormand@igalia.com>
     2
     3        [MSE][GStreamer] Crash in WebCore::PlaybackPipeline::addSourceBuffer when setting duration and preload is set to none
     4        https://bugs.webkit.org/show_bug.cgi?id=224260
     5
     6        Reviewed by Xabier Rodriguez-Calvar.
     7
     8        Disable delayed loading for the GStreamer MSE player, we want the MSE source element to be
     9        configured ASAP, otherwise the playback pipeline will fail in various ways (duration
     10        notifications sent too early, crashes in addSourceBuffer, crashes in attachTracks, and so
     11        on).
     12
     13        Test: media/media-source/media-source-no-preload-set-duration-crash.html
     14
     15        * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
     16        (WebCore::MediaPlayerPrivateGStreamerMSE::durationChanged):
     17
    1182021-04-16  Adrian Perez de Castro  <aperez@igalia.com>
    219
  • releases/WebKitGTK/webkit-2.32/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp

    r273309 r276701  
    357357
    358358    GST_DEBUG_OBJECT(pipeline(), "preload: %s", convertEnumerationToString(m_preload).utf8().data());
    359     if (m_preload == MediaPlayer::Preload::None) {
     359    if (m_preload == MediaPlayer::Preload::None && !isMediaSource()) {
    360360        GST_INFO_OBJECT(pipeline(), "Delaying load.");
    361361        m_isDelayingLoad = true;
  • releases/WebKitGTK/webkit-2.32/Source/WebCore/platform/graphics/gstreamer/mse/PlaybackPipeline.cpp

    r275027 r276701  
    104104MediaSourcePrivate::AddStatus PlaybackPipeline::addSourceBuffer(RefPtr<SourceBufferPrivateGStreamer> sourceBufferPrivate)
    105105{
     106    ASSERT(m_webKitMediaSrc);
    106107    WebKitMediaSrcPrivate* priv = m_webKitMediaSrc->priv;
    107108
    … …  
    259260void PlaybackPipeline::notifyDurationChanged()
    260261{
     262    ASSERT(m_webKitMediaSrc);
    261263    gst_element_post_message(GST_ELEMENT(m_webKitMediaSrc.get()), gst_message_new_duration_changed(GST_OBJECT(m_webKitMediaSrc.get())));
    262264    // WebKitMediaSrc will ask MediaPlayerPrivateGStreamerMSE for the new duration later, when somebody asks for it.
Note: See TracChangeset for help on using the changeset viewer.