[rygel-gst-0-10-fullscreen-renderer] Fix a crash when getting an error message from GStreamer.
- From: Krzesimir Nowak <krnowak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel-gst-0-10-fullscreen-renderer] Fix a crash when getting an error message from GStreamer.
- Date: Mon, 18 Feb 2013 10:06:39 +0000 (UTC)
commit b7bb9c76f7541d6eb61ab727b6ab34f9e5bca0ba
Author: Krzesimir Nowak <qdlacz gmail com>
Date: Mon Feb 18 10:54:11 2013 +0100
Fix a crash when getting an error message from GStreamer.
src/rygel-playbin-player.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/src/rygel-playbin-player.c b/src/rygel-playbin-player.c
index 6fbea41..610dae7 100644
--- a/src/rygel-playbin-player.c
+++ b/src/rygel-playbin-player.c
@@ -356,17 +356,21 @@ rygel_playbin_player_bus_handler (GstBus *bus, GstMessage *message, gpointer use
}
case GST_MESSAGE_ERROR:
{
+ GError *error = NULL;
gchar *error_message = NULL;
- gst_message_parse_error (message, NULL, &error_message);
-
gchar *name = gst_object_get_name (GST_OBJECT (self->priv->_playbin));
- g_warning ("rygel-playbin-player.c: Error from GStreamer element %s: %s", name, error_message);
- g_warning ("rygel-playbin-player.c: Going to STOPPED state");
+ gst_message_parse_error (message, &error, &error_message);
+ g_warning ("Error from GStreamer element %s: %s (%s)",
+ name,
+ error->message,
+ error_message);
g_free (name);
+ g_error_free (error);
+ g_free (error_message);
+ g_warning ("Going to STOPPED state");
rygel_media_player_set_playback_state (RYGEL_MEDIA_PLAYER (self), "STOPPED");
- g_free (error_message);
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]