[gst-devel] patch adder plugin

Jim Thornton jthornton at parc.com
Fri Mar 22 18:58:01 CET 2002


This is an attempt to handle EOS.  I have no idea what the best way to do 
this is, but I picked this up from another loop function and it seems to 
do the trick.  Without this we loop forever...

--- gstadder.c.orig     Fri Mar 22 13:37:15 2002
+++ gstadder.c  Fri Mar 22 14:01:41 2002
@@ -384,7 +384,12 @@
       zero_out[i] = 0;
 
     /* get data from all of the sinks */
-    inputs = adder->input_channels;
+    if (adder->input_channels == NULL) {
+      gst_pad_event_default(adder->srcpad, gst_event_new 
(GST_EVENT_EOS));
+      break;
+    } else {
+      inputs = adder->input_channels;
+    }
 
     GST_DEBUG (0, "starting to cycle through channels\n");
 






More information about the gstreamer-devel mailing list