diff options
author | Thomas Vander Stichele <thomas@apestaart.org> | 2004-01-31 15:56:32 +0000 |
---|---|---|
committer | Thomas Vander Stichele <thomas@apestaart.org> | 2004-01-31 15:56:32 +0000 |
commit | fcb5bb22d59986194882b54bdc2719237949476d (patch) | |
tree | 2e32833ecf8cb2280cc68e7c959e8ba8542df0f4 /examples/gstplay | |
parent | 4ec44f3b01f31a18c40162212bba83e3753686a0 (diff) | |
download | gst-plugins-bad-fcb5bb22d59986194882b54bdc2719237949476d.tar.gz gst-plugins-bad-fcb5bb22d59986194882b54bdc2719237949476d.tar.bz2 gst-plugins-bad-fcb5bb22d59986194882b54bdc2719237949476d.zip |
add error handling
Original commit message from CVS:
add error handling
Diffstat (limited to 'examples/gstplay')
-rw-r--r-- | examples/gstplay/player.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/examples/gstplay/player.c b/examples/gstplay/player.c index 67f452df..3c58c022 100644 --- a/examples/gstplay/player.c +++ b/examples/gstplay/player.c @@ -99,6 +99,7 @@ main (int argc, char *argv[]) { GstPlay *play; GstElement *data_src, *video_sink, *audio_sink, *vis_element; + GError *error; /* Initing GStreamer library */ gst_init (&argc, &argv); @@ -111,7 +112,13 @@ main (int argc, char *argv[]) loop = g_main_loop_new (NULL, FALSE); /* Creating the GstPlay object */ - play = gst_play_new (); + play = gst_play_new (&error); + if (error) + { + g_print ("Error: could not create play object:\n%s\n", error->message); + g_error_free (error); + return 1; + } /* Getting default audio and video plugins from GConf */ audio_sink = gst_element_factory_make ("osssink", "audio_sink"); |