diff --git a/examples/helloworld/helloworld.c b/examples/helloworld/helloworld.c index c23e3546bb..eff130dd16 100644 --- a/examples/helloworld/helloworld.c +++ b/examples/helloworld/helloworld.c @@ -15,13 +15,13 @@ int main(int argc,char *argv[]) { GstElement *bin, *disksrc, *parse, *decoder, *audiosink; + gst_init(&argc,&argv); + if (argc != 2) { g_print("usage: %s \n", argv[0]); exit(-1); } - gst_init(&argc,&argv); - /* create a new bin to hold the elements */ bin = gst_bin_new("bin"); diff --git a/tests/old/examples/helloworld/helloworld.c b/tests/old/examples/helloworld/helloworld.c index c23e3546bb..eff130dd16 100644 --- a/tests/old/examples/helloworld/helloworld.c +++ b/tests/old/examples/helloworld/helloworld.c @@ -15,13 +15,13 @@ int main(int argc,char *argv[]) { GstElement *bin, *disksrc, *parse, *decoder, *audiosink; + gst_init(&argc,&argv); + if (argc != 2) { g_print("usage: %s \n", argv[0]); exit(-1); } - gst_init(&argc,&argv); - /* create a new bin to hold the elements */ bin = gst_bin_new("bin");