mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
gst/multifile/gstmultifilesrc.*: When subsequent files are read, if the file doesn't exist, send an EOS instead of ca...
Original commit message from CVS: * gst/multifile/gstmultifilesrc.c: * gst/multifile/gstmultifilesrc.h: When subsequent files are read, if the file doesn't exist, send an EOS instead of causing an error.
This commit is contained in:
parent
d9cf6cc948
commit
45e90efd1b
4 changed files with 18 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
|||
2007-12-17 David Schleef <ds@schleef.org>
|
||||
|
||||
* gst/multifile/gstmultifilesrc.c:
|
||||
* gst/multifile/gstmultifilesrc.h:
|
||||
When subsequent files are read, if the file doesn't exist, send
|
||||
an EOS instead of causing an error.
|
||||
|
||||
2007-12-17 Andy Wingo <wingo@pobox.com>
|
||||
|
||||
* gst/switch/gstswitch.c (gst_selector_pad_chain): Return OK when
|
||||
|
|
2
common
2
common
|
@ -1 +1 @@
|
|||
Subproject commit a00d4c1966aab517c2694c61d580489ebcbce448
|
||||
Subproject commit 208ef72f86e944e6ba6941c68e57ffcea8d2a8f4
|
|
@ -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;
|
||||
|
|
|
@ -51,6 +51,7 @@ struct _GstMultiFileSrc
|
|||
int offset;
|
||||
|
||||
GstCaps *caps;
|
||||
gboolean successful_read;
|
||||
};
|
||||
|
||||
struct _GstMultiFileSrcClass
|
||||
|
|
Loading…
Reference in a new issue