[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.16-1409-g5afdf4d
eric at webkit.org
eric at webkit.org
Thu Dec 3 13:44:38 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit ed812e1385fbba3dff8707d8c0f32c9fcdeb4fe8
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Nov 25 15:59:05 2009 +0000
2009-11-25 Philippe Normand <pnormand at igalia.com>
Reviewed by Eric Seidel.
[GTK] use gst_init_check() instead of gst_init()
https://bugs.webkit.org/show_bug.cgi?id=31864
Use gst_init_check() instead of gst_init() to prevent eventual
unexpected exit of the application.
* platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
(WebCore::do_gst_init):
(WebCore::MediaPlayerPrivate::isAvailable):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51382 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 96120c5..342466b 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2009-11-25 Philippe Normand <pnormand at igalia.com>
+
+ Reviewed by Eric Seidel.
+
+ [GTK] use gst_init_check() instead of gst_init()
+ https://bugs.webkit.org/show_bug.cgi?id=31864
+
+ Use gst_init_check() instead of gst_init() to prevent eventual
+ unexpected exit of the application.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::do_gst_init):
+ (WebCore::MediaPlayerPrivate::isAvailable):
+
2009-11-25 Gustavo Noronha Silva <gustavo.noronha at collabora.co.uk>
Reviewed by Xan Lopez.
diff --git a/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp b/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp
index b325d8c..c0242a1 100644
--- a/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp
+++ b/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp
@@ -146,21 +146,28 @@ void MediaPlayerPrivate::registerMediaEngine(MediaEngineRegistrar registrar)
static bool gstInitialized = false;
-static void do_gst_init()
+static bool do_gst_init()
{
// FIXME: We should pass the arguments from the command line
if (!gstInitialized) {
- gst_init(0, 0);
- gstInitialized = true;
- gst_element_register(0, "webkitmediasrc", GST_RANK_PRIMARY,
- WEBKIT_TYPE_DATA_SRC);
+ GOwnPtr<GError> error;
+ gstInitialized = gst_init_check(0, 0, &error.outPtr());
+ if (!gstInitialized)
+ LOG_VERBOSE(Media, "Could not initialize GStreamer: %s",
+ error ? error->message : "unknown error occurred");
+ else
+ gst_element_register(0, "webkitmediasrc", GST_RANK_PRIMARY,
+ WEBKIT_TYPE_DATA_SRC);
}
+ return gstInitialized;
}
bool MediaPlayerPrivate::isAvailable()
{
- do_gst_init();
+ if (!do_gst_init())
+ return false;
+
GstElementFactory* factory = gst_element_factory_find("playbin2");
if (factory) {
gst_object_unref(GST_OBJECT(factory));
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list