From: Wim Taymans Date: Sat, 30 Mar 2002 17:09:53 +0000 (+0000) Subject: Added some sanity checks X-Git-Tag: BRANCH-RELEASE-0_3_3-ROOT~39 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0d2aa4c6d2b726eb2d2d80a6d7002682e6567c4f;p=platform%2Fupstream%2Fgstreamer.git Added some sanity checks Original commit message from CVS: Added some sanity checks --- diff --git a/examples/helloworld/helloworld.c b/examples/helloworld/helloworld.c index 7d062b3..d82d715 100644 --- a/examples/helloworld/helloworld.c +++ b/examples/helloworld/helloworld.c @@ -14,9 +14,11 @@ int main (int argc, char *argv[]) /* create a new bin to hold the elements */ bin = gst_pipeline_new ("pipeline"); + g_assert (bin); /* create a disk reader */ filesrc = gst_elementfactory_make ("filesrc", "disk_source"); + g_assert (filesrc); g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL); /* now it's time to get the decoder */ @@ -27,6 +29,7 @@ int main (int argc, char *argv[]) } /* and an audio sink */ osssink = gst_elementfactory_make ("osssink", "play_audio"); + g_assert (osssink); /* add objects to the main pipeline */ gst_bin_add_many (GST_BIN (bin), filesrc, decoder, osssink, NULL); diff --git a/tests/old/examples/helloworld/helloworld.c b/tests/old/examples/helloworld/helloworld.c index 7d062b3..d82d715 100644 --- a/tests/old/examples/helloworld/helloworld.c +++ b/tests/old/examples/helloworld/helloworld.c @@ -14,9 +14,11 @@ int main (int argc, char *argv[]) /* create a new bin to hold the elements */ bin = gst_pipeline_new ("pipeline"); + g_assert (bin); /* create a disk reader */ filesrc = gst_elementfactory_make ("filesrc", "disk_source"); + g_assert (filesrc); g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL); /* now it's time to get the decoder */ @@ -27,6 +29,7 @@ int main (int argc, char *argv[]) } /* and an audio sink */ osssink = gst_elementfactory_make ("osssink", "play_audio"); + g_assert (osssink); /* add objects to the main pipeline */ gst_bin_add_many (GST_BIN (bin), filesrc, decoder, osssink, NULL);