Make sure the loopfunction ends when an element goes to EOS.
authorWim Taymans <wim.taymans@gmail.com>
Sat, 20 Jan 2001 03:28:37 +0000 (03:28 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Sat, 20 Jan 2001 03:28:37 +0000 (03:28 +0000)
Original commit message from CVS:
Make sure the loopfunction ends when an element goes to EOS.
Fixed the fakesrc bug found by taaz.

gst/elements/gstfakesrc.c
gst/gstelement.c
plugins/elements/gstfakesrc.c

index 3189b8e..3d24cb1 100644 (file)
@@ -318,7 +318,7 @@ gst_fakesrc_loop(GstElement *element)
 
       if (src->num_buffers == 0) {
         gst_pad_set_eos (pad);
-        return NULL;
+        return;
       }
       else {
       if (src->num_buffers > 0)
index 835a181..70fc8a0 100644 (file)
@@ -1018,5 +1018,6 @@ gst_element_signal_eos (GstElement *element)
   g_return_if_fail (GST_IS_ELEMENT (element));
 
   gtk_signal_emit (GTK_OBJECT (element), gst_element_signals[EOS]);
+  GST_FLAG_SET(element,GST_ELEMENT_COTHREAD_STOPPING);
 }
 
index 3189b8e..3d24cb1 100644 (file)
@@ -318,7 +318,7 @@ gst_fakesrc_loop(GstElement *element)
 
       if (src->num_buffers == 0) {
         gst_pad_set_eos (pad);
-        return NULL;
+        return;
       }
       else {
       if (src->num_buffers > 0)