diff options
author | Tim-Philipp Müller <tim@centricular.net> | 2007-09-23 10:16:49 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.net> | 2007-09-23 10:16:49 +0000 |
commit | 558a8a90f3d88aa73024ebe41c24f0de70c55d43 (patch) | |
tree | 0294b81856dcc0485db9a30ebfeaab9db0fdb43d /tools | |
parent | e281264078c1e649f2d0abb614004fb7ff29fe2a (diff) |
plugins/elements/gstfakesink.c: Add some debug text to error message to indicate that we errored out on request.
Original commit message from CVS:
* plugins/elements/gstfakesink.c:
Add some debug text to error message to indicate that
we errored out on request.
* tools/gst-launch.c:
When the state change to PLAYING fails, check for an
error message on the bus and print it.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/gst-launch.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/gst-launch.c b/tools/gst-launch.c index c73f764e4b..56c9b1350e 100644 --- a/tools/gst-launch.c +++ b/tools/gst-launch.c @@ -731,7 +731,22 @@ main (int argc, char *argv[]) fprintf (stderr, _("Setting pipeline to PLAYING ...\n")); if (gst_element_set_state (pipeline, GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) { + GstMessage *err_msg; + GstBus *bus; + fprintf (stderr, _("ERROR: pipeline doesn't want to play.\n")); + bus = gst_element_get_bus (pipeline); + if ((err_msg = gst_bus_poll (bus, GST_MESSAGE_ERROR, 0))) { + GError *gerror; + gchar *debug; + + gst_message_parse_error (err_msg, &gerror, &debug); + gst_object_default_error (GST_MESSAGE_SRC (err_msg), gerror, debug); + gst_message_unref (err_msg); + g_error_free (gerror); + g_free (debug); + } + gst_object_unref (bus); res = -1; goto end; } |