diff options
Diffstat (limited to 'gst/multifile')
-rw-r--r-- | gst/multifile/gstmultifilesrc.c | 10 | ||||
-rw-r--r-- | gst/multifile/gstmultifilesrc.h | 1 |
2 files changed, 10 insertions, 1 deletions
diff --git a/gst/multifile/gstmultifilesrc.c b/gst/multifile/gstmultifilesrc.c index f347257c..35ded484 100644 --- a/gst/multifile/gstmultifilesrc.c +++ b/gst/multifile/gstmultifilesrc.c @@ -155,6 +155,7 @@ gst_multi_file_src_init (GstMultiFileSrc * multifilesrc, multifilesrc->index = DEFAULT_INDEX; multifilesrc->filename = g_strdup (DEFAULT_LOCATION); + multifilesrc->successful_read = FALSE; } static void @@ -279,7 +280,13 @@ gst_multi_file_src_create (GstPushSrc * src, GstBuffer ** buffer) file = fopen (filename, "rb"); if (!file) { - goto handle_error; + if (multifilesrc->successful_read) { + /* If we've read at least one buffer successfully, not finding the + * next file is EOS. */ + return GST_FLOW_UNEXPECTED; + } else { + goto handle_error; + } } fseek (file, 0, SEEK_END); @@ -293,6 +300,7 @@ gst_multi_file_src_create (GstPushSrc * src, GstBuffer ** buffer) goto handle_error; } + multifilesrc->successful_read = TRUE; multifilesrc->index++; GST_BUFFER_SIZE (buf) = size; diff --git a/gst/multifile/gstmultifilesrc.h b/gst/multifile/gstmultifilesrc.h index 7a08046c..686ae4f0 100644 --- a/gst/multifile/gstmultifilesrc.h +++ b/gst/multifile/gstmultifilesrc.h @@ -51,6 +51,7 @@ struct _GstMultiFileSrc int offset; GstCaps *caps; + gboolean successful_read; }; struct _GstMultiFileSrcClass |