plugins/elements/gstfilesrc.c: Requesting 0 bytes before the end of the file should result in

Original commit message from CVS:
* plugins/elements/gstfilesrc.c: (gst_file_src_create_read):
Requesting 0 bytes before the end of the file should result in
FLOW_OK and an empty buffer, not FLOW_UNEXPECTED. Thank you
unit test.
This commit is contained in:
Tim-Philipp Müller 2006-07-27 12:39:42 +00:00
parent c7853c7629
commit 6cd3b9de71
2 changed files with 9 additions and 2 deletions

View file

@ -1,3 +1,10 @@
2006-07-27 Tim-Philipp Müller <tim at centricular dot net>
* plugins/elements/gstfilesrc.c: (gst_file_src_create_read):
Requesting 0 bytes before the end of the file should result in
FLOW_OK and an empty buffer, not FLOW_UNEXPECTED. Thank you
unit test.
2006-07-27 Wim Taymans <wim@fluendo.com>
* gst/gstcaps.c: (gst_static_caps_get), (gst_caps_get_structure):

View file

@ -792,8 +792,8 @@ gst_file_src_create_read (GstFileSrc * src, guint64 offset, guint length,
if (G_UNLIKELY ((guint) ret < length && src->is_regular))
goto unexpected_eos;
/* other files should eos if they read 0 */
if (G_UNLIKELY (ret == 0))
/* other files should eos if they read 0 and more was requested */
if (G_UNLIKELY (ret == 0 && length > 0))
goto eos;
length = ret;