From d9123d846890c19fa182d7780c07454c86e9b012 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Sun, 1 Sep 2002 12:55:57 +0000 Subject: [PATCH] Don't doe EOS in a state change function Original commit message from CVS: Don't doe EOS in a state change function --- common | 2 +- gst/elements/gstfilesink.c | 7 +++++-- plugins/elements/gstfilesink.c | 7 +++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/common b/common index 655da47..355c616 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 655da47ef800ef59a367fb0768d27adc5ca9e489 +Subproject commit 355c616d5f6779ea194f8b61704229c6fb04ae7b diff --git a/gst/elements/gstfilesink.c b/gst/elements/gstfilesink.c index 56407ed..b6bab0b 100644 --- a/gst/elements/gstfilesink.c +++ b/gst/elements/gstfilesink.c @@ -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)) diff --git a/plugins/elements/gstfilesink.c b/plugins/elements/gstfilesink.c index 56407ed..b6bab0b 100644 --- a/plugins/elements/gstfilesink.c +++ b/plugins/elements/gstfilesink.c @@ -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)) -- 2.7.4