Title: [288287] releases/WebKitGTK/webkit-2.34/Source/WebCore
Revision
288287
Author
ape...@igalia.com
Date
2022-01-20 07:41:36 -0800 (Thu, 20 Jan 2022)

Log Message

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

Patch by Philippe Normand <pnorm...@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):

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.34/Source/WebCore/ChangeLog (288286 => 288287)


--- releases/WebKitGTK/webkit-2.34/Source/WebCore/ChangeLog	2022-01-20 15:39:21 UTC (rev 288286)
+++ releases/WebKitGTK/webkit-2.34/Source/WebCore/ChangeLog	2022-01-20 15:41:36 UTC (rev 288287)
@@ -1,3 +1,16 @@
+2021-12-23  Philippe Normand  <pnorm...@igalia.com>
+
+        [GStreamer] MediaPlayerPrivateGStreamer mishandles failure to create WebKitTextCombiner
+        https://bugs.webkit.org/show_bug.cgi?id=233230
+
+        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):
+
 2021-12-22  Frédéric Wang  <fw...@igalia.com>
 
         null ptr deref in DocumentTimeline::animate

Modified: releases/WebKitGTK/webkit-2.34/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (288286 => 288287)


--- releases/WebKitGTK/webkit-2.34/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2022-01-20 15:39:21 UTC (rev 288286)
+++ releases/WebKitGTK/webkit-2.34/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2022-01-20 15:41:36 UTC (rev 288287)
@@ -2703,9 +2703,8 @@
     if (m_isLegacyPlaybin)
         g_signal_connect_swapped(m_pipeline.get(), "text-changed", G_CALLBACK(textChangedCallback), this);
 
-    GstElement* textCombiner = webkitTextCombinerNew();
-    ASSERT(textCombiner);
-    g_object_set(m_pipeline.get(), "text-stream-combiner", textCombiner, nullptr);
+    if (auto* textCombiner = webkitTextCombinerNew())
+        g_object_set(m_pipeline.get(), "text-stream-combiner", textCombiner, nullptr);
 
     m_textSink = webkitTextSinkNew(makeWeakPtr(*this));
     ASSERT(m_textSink);

Modified: releases/WebKitGTK/webkit-2.34/Source/WebCore/platform/graphics/gstreamer/TextCombinerGStreamer.cpp (288286 => 288287)


--- releases/WebKitGTK/webkit-2.34/Source/WebCore/platform/graphics/gstreamer/TextCombinerGStreamer.cpp	2022-01-20 15:39:21 UTC (rev 288286)
+++ releases/WebKitGTK/webkit-2.34/Source/WebCore/platform/graphics/gstreamer/TextCombinerGStreamer.cpp	2022-01-20 15:41:36 UTC (rev 288287)
@@ -219,7 +219,7 @@
 {
     // The combiner relies on webvttenc, fail early if it's not there.
     if (!isGStreamerPluginAvailable("subenc")) {
-        WTFLogAlways("WebKit wasn't able to find a WebVTT encoder. Not continuing without platform support for subtitles.");
+        WTFLogAlways("WebKit wasn't able to find a WebVTT encoder. Subtitles handling will be degraded unless gst-plugins-bad is installed.");
         return nullptr;
     }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to