multifilesrc->index = DEFAULT_INDEX;
multifilesrc->filename = g_strdup (DEFAULT_LOCATION);
+ multifilesrc->successful_read = FALSE;
}
static void
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);
goto handle_error;
}
+ multifilesrc->successful_read = TRUE;
multifilesrc->index++;
GST_BUFFER_SIZE (buf) = size;