Changeset 287410 in webkit


Ignore:
Timestamp:
Dec 23, 2021 12:56:29 PM (2 years ago)
Author:
commit-queue@webkit.org
Message:

[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:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r287405 r287410  
     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-23  Sihui Liu  <sihui_liu@apple.com>
    215
  • trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp

    r287021 r287410  
    27602760        g_signal_connect_swapped(m_pipeline.get(), "text-changed", G_CALLBACK(textChangedCallback), this);
    27612761
    2762     GstElement* textCombiner = webkitTextCombinerNew();
    2763     ASSERT(textCombiner);
    2764     g_object_set(m_pipeline.get(), "text-stream-combiner", textCombiner, nullptr);
     2762    if (auto* textCombiner = webkitTextCombinerNew())
     2763        g_object_set(m_pipeline.get(), "text-stream-combiner", textCombiner, nullptr);
    27652764
    27662765    m_textSink = webkitTextSinkNew(*this);
  • trunk/Source/WebCore/platform/graphics/gstreamer/TextCombinerGStreamer.cpp

    r279285 r287410  
    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.