Don't doe EOS in a state change function
authorWim Taymans <wim.taymans@gmail.com>
Sun, 1 Sep 2002 12:55:57 +0000 (12:55 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Sun, 1 Sep 2002 12:55:57 +0000 (12:55 +0000)
Original commit message from CVS:
Don't doe EOS in a state change function

common
gst/elements/gstfilesink.c
plugins/elements/gstfilesink.c

diff --git a/common b/common
index 655da47..355c616 160000 (submodule)
--- a/common
+++ b/common
@@ -1 +1 @@
-Subproject commit 655da47ef800ef59a367fb0768d27adc5ca9e489
+Subproject commit 355c616d5f6779ea194f8b61704229c6fb04ae7b
index 56407ed..b6bab0b 100644 (file)
@@ -234,7 +234,6 @@ gst_filesink_open_file (GstFileSink *sink)
   if (!gst_filesink_getcurrentfilename(sink))
   {
     /* Out of files */
-    gst_element_set_eos(GST_ELEMENT(sink));
     return FALSE;
   }
   sink->file = fopen (gst_filesink_getcurrentfilename(sink), "w");
@@ -322,7 +321,11 @@ gst_filesink_handle_event (GstPad *pad, GstEvent *event)
       /* we need to open a new file! */
       gst_filesink_close_file(filesink);
       filesink->filenum++;
-      if (!gst_filesink_open_file(filesink)) return FALSE;
+      if (!gst_filesink_open_file(filesink)) {
+       /* no more files, give EOS */
+        gst_element_set_eos(GST_ELEMENT(filesink));
+       return FALSE;
+      }
       break;
     case GST_EVENT_FLUSH:
       if (fflush(filesink->file))
index 56407ed..b6bab0b 100644 (file)
@@ -234,7 +234,6 @@ gst_filesink_open_file (GstFileSink *sink)
   if (!gst_filesink_getcurrentfilename(sink))
   {
     /* Out of files */
-    gst_element_set_eos(GST_ELEMENT(sink));
     return FALSE;
   }
   sink->file = fopen (gst_filesink_getcurrentfilename(sink), "w");
@@ -322,7 +321,11 @@ gst_filesink_handle_event (GstPad *pad, GstEvent *event)
       /* we need to open a new file! */
       gst_filesink_close_file(filesink);
       filesink->filenum++;
-      if (!gst_filesink_open_file(filesink)) return FALSE;
+      if (!gst_filesink_open_file(filesink)) {
+       /* no more files, give EOS */
+        gst_element_set_eos(GST_ELEMENT(filesink));
+       return FALSE;
+      }
       break;
     case GST_EVENT_FLUSH:
       if (fflush(filesink->file))