[Bug 665921] New: Incorrect EOF detection in gst_file_src_create_read
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Sat Dec 10 11:07:07 PST 2011
https://bugzilla.gnome.org/show_bug.cgi?id=665921
GStreamer | common | 0.10.35
Summary: Incorrect EOF detection in gst_file_src_create_read
Classification: Platform
Product: GStreamer
Version: 0.10.35
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: common
AssignedTo: gstreamer-bugs at lists.freedesktop.org
ReportedBy: gnome-bugzilla at contact.mpierce.org
QAContact: gstreamer-bugs at lists.freedesktop.org
GNOME version: ---
I'm seeing occasional issues playing files on a CIFS mountpoint in Clementine.
https://code.google.com/p/clementine-player/issues/detail?id=2469 is the
Clementine bug I filed. The log lines there indicate that gstreamer is getting
"unexpected end of file."
The logging made it easy to find gst_file_src_create_read in gstfilesrc.c
Here's an abbreviated version of the function that shows what I think is the
incorrect code path.
ret = read (src->fd, GST_BUFFER_DATA (buf), length);
...
/* seekable regular files should have given us what we expected */
if (G_UNLIKELY ((guint) ret < length && src->seekable))
goto unexpected_eos;
...
unexpected_eos:
{
GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL),
("unexpected end of file."));
gst_buffer_unref (buf);
return GST_FLOW_ERROR;
}
Saying that (ret < length && src->seekable) is an error seems contrary to the
man page of the read(2) syscall:
RETURN VALUE
(snip) It is not an error if this number is smaller than the number of bytes
requested (snip)
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list