[gstreamer-bugs] [Bug 339843] New: fdsink should not necessarily return an error if bytes_written != GST_BUFFER_SIZE
GStreamer (bugzilla.gnome.org)
bugzilla-daemon at bugzilla.gnome.org
Wed Apr 26 10:45:49 PDT 2006
Do not reply to this via email (we are currently unable to handle email
responses and they get discarded). You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=339843
GStreamer | gstreamer (core) | Ver: 0.10.x
Summary: fdsink should not necessarily return an error if
bytes_written != GST_BUFFER_SIZE
Product: GStreamer
Version: 0.10.x
Platform: Other
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: gstreamer (core)
AssignedTo: gstreamer-bugs at lists.sourceforge.net
ReportedBy: philippero at libertysurf.fr
QAContact: gstreamer-bugs at lists.sourceforge.net
GNOME version: Unspecified
GNOME milestone: Unspecified
Fdsink returns an error when it could not write all data of the buffer at once
since we check that the number of bytes written is equal to the size of the
buffer.
Now, sometimes if we use a pipe and the reader process hasn't started to read
or hasn't read for some time, after a time (when the pipe buffer is full I
guess) we can only write just a part of the buffer contents (it happened to me
while debugging). Then, the number of bytes returned by the write !=
GST_BUFFER_SIZE. But that's not an error, if we check errno it's still equal to
0. Moreover when the reader process starts to read again we can write the rest
of the buffer.
So what I propose is to check errno if bytes_written != GST_BUFFER_SIZE and if
errno is 0, we go back to select to wait for the pipe to be ready again to
accept input.
See following patch.
--
Configure bugmail: http://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