Title: [211868] trunk/Source/WebCore
Revision
211868
Author
[email protected]
Date
2017-02-08 04:39:24 -0800 (Wed, 08 Feb 2017)

Log Message

[GStreamer] Critical warnings when media player is destroyed
https://bugs.webkit.org/show_bug.cgi?id=167981

Patch by Carlos Garcia Campos <[email protected]> on 2017-02-08
Reviewed by Xabier Rodriguez-Calvar.

It can happen that the source doesn't have a parent when we try to disconnect the element-added signal.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::sourceChanged):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (211867 => 211868)


--- trunk/Source/WebCore/ChangeLog	2017-02-08 12:19:05 UTC (rev 211867)
+++ trunk/Source/WebCore/ChangeLog	2017-02-08 12:39:24 UTC (rev 211868)
@@ -1,3 +1,16 @@
+2017-02-08  Carlos Garcia Campos  <[email protected]>
+
+        [GStreamer] Critical warnings when media player is destroyed
+        https://bugs.webkit.org/show_bug.cgi?id=167981
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        It can happen that the source doesn't have a parent when we try to disconnect the element-added signal.
+
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+        (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
+        (WebCore::MediaPlayerPrivateGStreamer::sourceChanged):
+
 2017-02-08  Miguel Gomez  <[email protected]>
 
         [GTK] Reduce TiledBackingStore tile coverage when on memory pressure state

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (211867 => 211868)


--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2017-02-08 12:19:05 UTC (rev 211867)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2017-02-08 12:39:24 UTC (rev 211868)
@@ -200,7 +200,7 @@
         m_mediaLocations = 0;
     }
 
-    if (WEBKIT_IS_WEB_SRC(m_source.get()))
+    if (WEBKIT_IS_WEB_SRC(m_source.get()) && GST_OBJECT_PARENT(m_source.get()))
         g_signal_handlers_disconnect_by_func(GST_ELEMENT_PARENT(m_source.get()), reinterpret_cast<gpointer>(uriDecodeBinElementAddedCallback), this);
 
     if (m_autoAudioSink)
@@ -1411,7 +1411,7 @@
 
 void MediaPlayerPrivateGStreamer::sourceChanged()
 {
-    if (WEBKIT_IS_WEB_SRC(m_source.get()))
+    if (WEBKIT_IS_WEB_SRC(m_source.get()) && GST_OBJECT_PARENT(m_source.get()))
         g_signal_handlers_disconnect_by_func(GST_ELEMENT_PARENT(m_source.get()), reinterpret_cast<gpointer>(uriDecodeBinElementAddedCallback), this);
 
     m_source.clear();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to