gst/adder/gstadder.c: properly error out when no negotiation has happened yet. (fixes...
authorBenjamin Otte <otte@gnome.org>
Sun, 6 Jun 2004 23:43:15 +0000 (23:43 +0000)
committerBenjamin Otte <otte@gnome.org>
Sun, 6 Jun 2004 23:43:15 +0000 (23:43 +0000)
Original commit message from CVS:
reviewed by Benjamin Otte  <otte@gnome.org>
* gst/adder/gstadder.c: (gst_adder_loop):
properly error out when no negotiation has happened yet. (fixes
#143032)

ChangeLog
gst/adder/gstadder.c

index bbcb32f87813023ab6e9691bc1efe9f5fbbcb977..654d8007d39c1c46de0f0ee061017484736f1c54 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2004-06-07  Tim-Philipp Müller  <t.i.m@zen.co.uk>
+
+       reviewed by Benjamin Otte  <otte@gnome.org>
+
+       * gst/adder/gstadder.c: (gst_adder_loop):
+         properly error out when no negotiation has happened yet. (fixes
+         #143032)
+
 2004-06-06  Benjamin Otte  <otte@gnome.org>
 
        * ext/mad/gstid3tag.c: (gst_id3_tag_handle_event):
index e44e703673b819aef41d6d5944f3d5a1f0588213..a3bd786b87eee51a7fac4528642750e021a491a9 100644 (file)
@@ -454,12 +454,18 @@ gst_adder_loop (GstElement * element)
       GST_LOG ("done copying data");
     }
   }
-  if (adder->width == 0)
+  if (adder->width == 0) {
     GST_ELEMENT_ERROR (adder, CORE, NEGOTIATION, (NULL), ("width is 0"));
-  if (adder->channels == 0)
+    return;
+  }
+  if (adder->channels == 0) {
     GST_ELEMENT_ERROR (adder, CORE, NEGOTIATION, (NULL), ("channels is 0"));
-  if (adder->rate == 0)
+    return;
+  }
+  if (adder->rate == 0) {
     GST_ELEMENT_ERROR (adder, CORE, NEGOTIATION, (NULL), ("rate is 0"));
+    return;
+  }
 
   GST_BUFFER_TIMESTAMP (buf_out) = adder->timestamp;
   if (adder->format == GST_ADDER_FORMAT_FLOAT)