[gst-cvs] qt-gstreamer: gst_message_parse_error, _info and _warning require a non-NULL GError pointer even if we are not going to use it .

Mauricio Piacentini piacentini at kemper.freedesktop.org
Mon Nov 29 09:04:53 PST 2010


Module: qt-gstreamer
Branch: master
Commit: eafc16be7cb25b117d79de907e9a7f4939178651
URL:    http://cgit.freedesktop.org/gstreamer/qt-gstreamer/commit/?id=eafc16be7cb25b117d79de907e9a7f4939178651

Author: Mauricio Piacentini <mauricio.piacentini at collabora.co.uk>
Date:   Mon Nov 29 15:04:22 2010 -0200

gst_message_parse_error, _info and _warning require a non-NULL GError pointer even if we are not going to use it.

---

 src/QGst/message.cpp |   21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/src/QGst/message.cpp b/src/QGst/message.cpp
index 291a18c..be40bfe 100644
--- a/src/QGst/message.cpp
+++ b/src/QGst/message.cpp
@@ -91,7 +91,12 @@ QGlib::Error ErrorMessage::error() const
 QString ErrorMessage::debugMessage() const
 {
     gchar *debug;
-    gst_message_parse_error(object<GstMessage>(), NULL, &debug);
+    GError *e;
+    //Passing a NULL pointer for the GError is not supported
+    gst_message_parse_error(object<GstMessage>(), &e, &debug);
+    if (e) {
+        g_error_free (e);
+    }
     return QGlib::Private::stringFromGCharPtr(debug);
 }
 
@@ -115,7 +120,12 @@ QGlib::Error WarningMessage::error() const
 QString WarningMessage::debugMessage() const
 {
     gchar *debug;
-    gst_message_parse_warning(object<GstMessage>(), NULL, &debug);
+    GError *e;
+    //Passing a NULL pointer for the GError is not supported
+    gst_message_parse_warning(object<GstMessage>(), &e, &debug);
+    if (e) {
+        g_error_free (e);
+    }
     return QGlib::Private::stringFromGCharPtr(debug);
 }
 
@@ -139,7 +149,12 @@ QGlib::Error InfoMessage::error() const
 QString InfoMessage::debugMessage() const
 {
     gchar *debug;
-    gst_message_parse_info(object<GstMessage>(), NULL, &debug);
+    GError *e;
+    //Passing a NULL pointer for the GError is not supported
+    gst_message_parse_info(object<GstMessage>(), &e, &debug);
+    if (e) {
+        g_error_free (e);
+    }
     return QGlib::Private::stringFromGCharPtr(debug);
 }
 





More information about the Gstreamer-commits mailing list