Title: [287410] trunk/Source/WebCore
- Revision
- 287410
- Author
- [email protected]
- Date
- 2021-12-23 12:56:29 -0800 (Thu, 23 Dec 2021)
Log Message
[GStreamer] MediaPlayerPrivateGStreamer mishandles failure to create WebKitTextCombiner
https://bugs.webkit.org/show_bug.cgi?id=233230
Patch by Philippe Normand <[email protected]> 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: trunk/Source/WebCore/ChangeLog (287409 => 287410)
--- trunk/Source/WebCore/ChangeLog 2021-12-23 20:54:21 UTC (rev 287409)
+++ trunk/Source/WebCore/ChangeLog 2021-12-23 20:56:29 UTC (rev 287410)
@@ -1,3 +1,16 @@
+2021-12-23 Philippe Normand <[email protected]>
+
+ [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-23 Sihui Liu <[email protected]>
Ensure file handles used in FileSystemAccess API are closed
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (287409 => 287410)
--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2021-12-23 20:54:21 UTC (rev 287409)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2021-12-23 20:56:29 UTC (rev 287410)
@@ -2759,9 +2759,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(*this);
ASSERT(m_textSink);
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/TextCombinerGStreamer.cpp (287409 => 287410)
--- trunk/Source/WebCore/platform/graphics/gstreamer/TextCombinerGStreamer.cpp 2021-12-23 20:54:21 UTC (rev 287409)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/TextCombinerGStreamer.cpp 2021-12-23 20:56:29 UTC (rev 287410)
@@ -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
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes