+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):
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)
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);
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)
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);