Changeset 288287 in webkit


Ignore:
Timestamp:
Jan 20, 2022 7:41:36 AM (2 years ago)
Author:
Adrian Perez de Castro
Message:

Merge r287410 - [GStreamer] MediaPlayerPrivateGStreamer mishandles failure to create WebKitTextCombiner
https://bugs.webkit.org/show_bug.cgi?id=233230

Patch by Philippe Normand <pnormand@igalia.com> on 2021-12-23
Reviewed by Michael Catanzaro.

Gracefully fail when the subenc plugin is not available. It is optional, we should not
assert or crash if it's not found. Two warnings are logged already when it's not found.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):

Location:
releases/WebKitGTK/webkit-2.34/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • releases/WebKitGTK/webkit-2.34/Source/WebCore/ChangeLog

    r288286 r288287  
     12021-12-23  Philippe Normand  <pnormand@igalia.com>
     2
     3        [GStreamer] MediaPlayerPrivateGStreamer mishandles failure to create WebKitTextCombiner
     4        https://bugs.webkit.org/show_bug.cgi?id=233230
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        Gracefully fail when the subenc plugin is not available. It is optional, we should not
     9        assert or crash if it's not found. Two warnings are logged already when it's not found.
     10
     11        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
     12        (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
     13
    1142021-12-22  Frédéric Wang  <fwang@igalia.com>
    215
  • releases/WebKitGTK/webkit-2.34/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp

    r287176 r288287  
    27042704        g_signal_connect_swapped(m_pipeline.get(), "text-changed", G_CALLBACK(textChangedCallback), this);
    27052705
    2706     GstElement* textCombiner = webkitTextCombinerNew();
    2707     ASSERT(textCombiner);
    2708     g_object_set(m_pipeline.get(), "text-stream-combiner", textCombiner, nullptr);
     2706    if (auto* textCombiner = webkitTextCombinerNew())
     2707        g_object_set(m_pipeline.get(), "text-stream-combiner", textCombiner, nullptr);
    27092708
    27102709    m_textSink = webkitTextSinkNew(makeWeakPtr(*this));
  • releases/WebKitGTK/webkit-2.34/Source/WebCore/platform/graphics/gstreamer/TextCombinerGStreamer.cpp

    r279285 r288287  
    220220    // The combiner relies on webvttenc, fail early if it's not there.
    221221    if (!isGStreamerPluginAvailable("subenc")) {
    222         WTFLogAlways("WebKit wasn't able to find a WebVTT encoder. Not continuing without platform support for subtitles.");
     222        WTFLogAlways("WebKit wasn't able to find a WebVTT encoder. Subtitles handling will be degraded unless gst-plugins-bad is installed.");
    223223        return nullptr;
    224224    }
Note: See TracChangeset for help on using the changeset viewer.