examples/retag/retag.c: Call gst_init before processing program args. Add g_assert to _link_many call.

Original commit message from CVS:
2004-01-18  Colin Walters  <walters@verbum.org>

* examples/retag/retag.c: Call gst_init before processing
program args.  Add g_assert to _link_many call.
This commit is contained in:
Colin Walters 2004-01-18 18:48:44 +00:00
parent 2dbab3aad3
commit b0171c4aa5
3 changed files with 13 additions and 8 deletions

View file

@ -1,3 +1,8 @@
2004-01-18 Colin Walters <walters@verbum.org>
* examples/retag/retag.c: Call gst_init before processing
program args. Add g_assert to _link_many call.
2004-01-16 Benjamin Otte <in7y118@public.uni-hamburg.de>
* gst/gstpad.c: (gst_pad_alloc_buffer):

View file

@ -21,15 +21,15 @@ main (int argc, char *argv[])
GstElement *bin, *filesrc, *tag_changer, *filesink;
gchar *artist, *title, *ext, *filename;
/* initialize GStreamer */
gst_init (&argc, &argv);
/* check that the argument is there */
if (argc != 2) {
g_print ("usage: %s <mp3 file>\n", argv[0]);
return 1;
}
/* initialize GStreamer */
gst_init (&argc, &argv);
/* parse the mp3 name */
artist = strrchr (argv[1], '/');
if (artist == NULL)
@ -83,7 +83,7 @@ main (int argc, char *argv[])
gst_bin_add_many (GST_BIN (bin), filesrc, tag_changer, filesink, NULL);
/* link the elements */
gst_element_link_many (filesrc, tag_changer, filesink, NULL);
g_assert (gst_element_link_many (filesrc, tag_changer, filesink));
/* start playing */
gst_element_set_state (bin, GST_STATE_PLAYING);

View file

@ -21,15 +21,15 @@ main (int argc, char *argv[])
GstElement *bin, *filesrc, *tag_changer, *filesink;
gchar *artist, *title, *ext, *filename;
/* initialize GStreamer */
gst_init (&argc, &argv);
/* check that the argument is there */
if (argc != 2) {
g_print ("usage: %s <mp3 file>\n", argv[0]);
return 1;
}
/* initialize GStreamer */
gst_init (&argc, &argv);
/* parse the mp3 name */
artist = strrchr (argv[1], '/');
if (artist == NULL)
@ -83,7 +83,7 @@ main (int argc, char *argv[])
gst_bin_add_many (GST_BIN (bin), filesrc, tag_changer, filesink, NULL);
/* link the elements */
gst_element_link_many (filesrc, tag_changer, filesink, NULL);
g_assert (gst_element_link_many (filesrc, tag_changer, filesink));
/* start playing */
gst_element_set_state (bin, GST_STATE_PLAYING);