[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor-browser/tor-browser-31.7.0esr-5.0-1] Bug 16026: Fix crash in GStreamer
commit bc455d559db70c2106124492d9aa1e516b63ed52
Author: Georg Koppen <gk@xxxxxxxxxxxxxx>
Date: Fri May 22 07:38:56 2015 +0000
Bug 16026: Fix crash in GStreamer
This is a backport of the patch attached to Mozilla's bug 1145230
(https://bugzilla.mozilla.org/show_bug.cgi?id=1145230).
---
content/media/gstreamer/GStreamerReader.cpp | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/content/media/gstreamer/GStreamerReader.cpp b/content/media/gstreamer/GStreamerReader.cpp
index e17f767..b9ba73b 100644
--- a/content/media/gstreamer/GStreamerReader.cpp
+++ b/content/media/gstreamer/GStreamerReader.cpp
@@ -220,12 +220,15 @@ void GStreamerReader::ElementAddedCb(GstBin *aPlayBin,
GstElement *aElement,
gpointer aUserData)
{
- const gchar *name =
- gst_plugin_feature_get_name(GST_PLUGIN_FEATURE(gst_element_get_factory(aElement)));
-
- if (!strcmp(name, "uridecodebin")) {
- g_signal_connect(G_OBJECT(aElement), "autoplug-sort",
- G_CALLBACK(GStreamerReader::ElementFilterCb), aUserData);
+ GstElementFactory *factory = gst_element_get_factory(aElement);
+ if (factory) {
+ const gchar *name =
+ gst_plugin_feature_get_name(GST_PLUGIN_FEATURE(factory));
+
+ if (!strcmp(name, "uridecodebin")) {
+ g_signal_connect(G_OBJECT(aElement), "autoplug-sort",
+ G_CALLBACK(GStreamerReader::ElementFilterCb), aUserData);
+ }
}
}
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits