[rygel-gst-0-10-media-engine] Don't crash on pipeline errors
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel-gst-0-10-media-engine] Don't crash on pipeline errors
- Date: Wed, 13 Feb 2013 15:25:20 +0000 (UTC)
commit 49bd7741a529bfa959bbd163ca89b986efd1fb1a
Author: Jens Georg <jensg openismus com>
Date: Wed Feb 13 14:31:18 2013 +0100
Don't crash on pipeline errors
Contrary to the documentation it's not ok to pass NULL for the GError.
https://bugzilla.gnome.org/show_bug.cgi?id=693704
src/rygel-gst-data-source.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/src/rygel-gst-data-source.c b/src/rygel-gst-data-source.c
index 921a740..06d36f6 100644
--- a/src/rygel-gst-data-source.c
+++ b/src/rygel-gst-data-source.c
@@ -265,21 +265,27 @@ on_bus_watch (GstBus *bus G_GNUC_UNUSED,
} else {
gchar *err_msg = NULL;
gchar *pipeline_name = gst_object_get_name (GST_OBJECT (self->priv->pipeline));
+ GError *error = NULL;
if (message->type == GST_MESSAGE_ERROR) {
- gst_message_parse_error (message, NULL, &err_msg);
- g_critical (_("Error from pipeline %s: %s"),
+ gst_message_parse_error (message, &error, &err_msg);
+ g_critical (_("Error from pipeline %s: %s %s"),
pipeline_name,
+ error->message,
err_msg);
ret = FALSE;
} else if (message->type == GST_MESSAGE_WARNING) {
- gst_message_parse_warning (message, NULL, &err_msg);
- g_warning (_("Warning from pipeline %s: %s"),
+ gst_message_parse_warning (message, &error, &err_msg);
+ g_warning (_("Warning from pipeline %s: %s %s"),
pipeline_name,
+ error->message,
err_msg);
}
+ if (error != NULL) {
+ g_error_free (error);
+ }
g_free (pipeline_name);
g_free (err_msg);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]