Use g_return_val_if_fail() instead of g_return_if_fail() where needed.

Original commit message from CVS:
Use g_return_val_if_fail() instead of g_return_if_fail() where needed.
This commit is contained in:
David I. Lehn 2001-03-04 22:26:33 +00:00
parent 066b743683
commit 161ee535ef

View file

@ -1,4 +1,3 @@
#include <gnome.h> #include <gnome.h>
#include <gst/gst.h> #include <gst/gst.h>
@ -64,22 +63,22 @@ int main(int argc,char *argv[]) {
g_return_val_if_fail(parse != NULL, -1); g_return_val_if_fail(parse != NULL, -1);
queue = gst_elementfactory_make("queue","queue"); queue = gst_elementfactory_make("queue","queue");
g_return_if_fail(queue != NULL); g_return_val_if_fail(queue != NULL, -1);
/**** /****
* you can substitute mpeg2play with you own player here * you can substitute mpeg2play with you own player here
* optionally you can remove the pares2 element. make * optionally you can remove the parse2 element. make
* sure to remove the pad connections too and don't add the * sure to remove the pad connections too and don't add the
* mp2videoparse element to the bin. * mp2videoparse element to the bin.
**/ **/
//parse2 = gst_elementfactory_make("mp2videoparse","parse"); //parse2 = gst_elementfactory_make("mp2videoparse","parse");
//g_return_if_fail(parse2 != NULL); //g_return_val_if_fail(parse2 != NULL, -1);
decode = gst_elementfactory_make("mpeg2dec","decode_video"); decode = gst_elementfactory_make("mpeg2dec","decode_video");
g_return_if_fail(decode != NULL); g_return_val_if_fail(decode != NULL, -1);
show = gst_elementfactory_make("videosink","show"); show = gst_elementfactory_make("videosink","show");
//gtk_object_set(GTK_OBJECT(show),"xv_enabled",FALSE,NULL); //gtk_object_set(GTK_OBJECT(show),"xv_enabled",FALSE,NULL);
g_return_if_fail(show != NULL); g_return_val_if_fail(show != NULL, -1);
appwindow = gnome_app_new("MPEG player","MPEG player"); appwindow = gnome_app_new("MPEG player","MPEG player");
gnome_app_set_contents(GNOME_APP(appwindow), gnome_app_set_contents(GNOME_APP(appwindow),