gst/parse/grammar.y: fix assert to not trigger when there's no error argument
authorBenjamin Otte <otte@gnome.org>
Tue, 4 May 2004 17:00:11 +0000 (17:00 +0000)
committerBenjamin Otte <otte@gnome.org>
Tue, 4 May 2004 17:00:11 +0000 (17:00 +0000)
Original commit message from CVS:
* gst/parse/grammar.y:
fix assert to not trigger when there's no error argument
* gst/parse/parse.l:
fix definition of caps to allow more than two structures
* testsuite/caps/Makefile.am:
* testsuite/caps/renegotiate.c: (main):
it's sinesrc and works in that case

ChangeLog
gst/parse/grammar.y
gst/parse/parse.l
tests/old/testsuite/caps/Makefile.am
tests/old/testsuite/caps/renegotiate.c
testsuite/caps/Makefile.am
testsuite/caps/renegotiate.c

index fca09aa..89b6aa8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2004-05-04  Benjamin Otte  <otte@gnome.org>
+
+       * gst/parse/grammar.y:
+         fix assert to not trigger when there's no error argument
+       * gst/parse/parse.l:
+         fix definition of caps to allow more than two structures
+       * testsuite/caps/Makefile.am:
+       * testsuite/caps/renegotiate.c: (main):
+         it's sinesrc and works in that case
+
 2004-05-04  Wim Taymans  <wim@fluendo.com>
 
        * gst/schedulers/gstoptimalscheduler.c: (remove_from_group),
index 11cac7b..53ec945 100644 (file)
@@ -912,7 +912,8 @@ error1:
   g_slist_foreach (g.links, (GFunc)gst_parse_free_link, NULL);
   g_slist_free (g.links);
   
-  g_assert (*error);
+  if (error)
+    g_assert (*error);
   ret = NULL;
   
   goto out;
index 0b9e24a..14b4f22 100644 (file)
@@ -46,7 +46,7 @@ _mimetype ({_mimechar}+"/"{_mimechar}+)|("\""([^\"]|"\\\"")*"\"")|("'"([^']|"\\\
 _capschar ("\\".)|([^\;!])
 _capsstring {_capschar}+|("\""([^\"]|"\\\"")*"\"")|("'"([^']|"\\\"")*"'")
 _caps {_mimetype}(","[^!]|{_capsstring})*
-_link ("!"[[:space:]]*{_caps}([[:space:]]*";"[[:space:]]*{_caps})*[[:space:]]*"!")|("!")
+_link ("!"[[:space:]]*{_caps}([[:space:]]*(";"[[:space:]]*{_caps})*[[:space:]]*)*"!")|("!")
 
 %x value
 %option noyywrap
index 0ecf19c..a934d86 100644 (file)
@@ -28,7 +28,7 @@ EXTRA_DIST = caps_strings
 noinst_HEADERS = \
        caps.h
 
-tests_fail = renegotiate
+tests_fail = 
 tests_ignore =
 
 app_fixate_LDADD = $(GST_OBJ_LIBS) 
index 183fcfa..6265a6b 100644 (file)
@@ -60,15 +60,16 @@ main (int argc, char *argv[])
   const GList *l2;
   int i;
   int ret;
+  GError *error = NULL;
 
   gst_init (&argc, &argv);
 
   /* change sinesrk to sinesrc once gst_parse_launch is fixed */
-  pipeline = gst_parse_launch ("sinesrk ! audioconvert ! "
+  pipeline = gst_parse_launch ("sinesrc ! audioconvert ! "
       "audio/x-raw-int, channels=2, rate=48000;"
-      "audio/x-raw-int, channels=1, rate=44100 !" "fakesink", NULL);
+      "audio/x-raw-int, channels=1, rate=44100 !" "fakesink", &error);
 
-  if (pipeline == NULL) {
+  if (error != NULL) {
     g_print
         ("oops, couldn't build pipeline.  You probably don't have audioconvert or sinesrc\n");
     exit (0);
index 0ecf19c..a934d86 100644 (file)
@@ -28,7 +28,7 @@ EXTRA_DIST = caps_strings
 noinst_HEADERS = \
        caps.h
 
-tests_fail = renegotiate
+tests_fail = 
 tests_ignore =
 
 app_fixate_LDADD = $(GST_OBJ_LIBS) 
index 183fcfa..6265a6b 100644 (file)
@@ -60,15 +60,16 @@ main (int argc, char *argv[])
   const GList *l2;
   int i;
   int ret;
+  GError *error = NULL;
 
   gst_init (&argc, &argv);
 
   /* change sinesrk to sinesrc once gst_parse_launch is fixed */
-  pipeline = gst_parse_launch ("sinesrk ! audioconvert ! "
+  pipeline = gst_parse_launch ("sinesrc ! audioconvert ! "
       "audio/x-raw-int, channels=2, rate=48000;"
-      "audio/x-raw-int, channels=1, rate=44100 !" "fakesink", NULL);
+      "audio/x-raw-int, channels=1, rate=44100 !" "fakesink", &error);
 
-  if (pipeline == NULL) {
+  if (error != NULL) {
     g_print
         ("oops, couldn't build pipeline.  You probably don't have audioconvert or sinesrc\n");
     exit (0);