[FFmpeg-devel] [RFC] more intelligent EAGAIN handling in url_read_complete

Reimar Döffinger Reimar.Doeffinger
Sun Jan 24 11:51:38 CET 2010


Hello,
not sure if this is overkill, but this improves EAGAIN handling
in url_read_complete:
It will retry reading in quick succession for the first 5 times
it receives EAGAIN and sleep if it still gets EAGAIN.
Each time some data is read successfully, it will increase the
counter to at least two fast retries.
The numbers (5 and 2) are rather arbitrary, though I think they
should be appropriate for fast handling of EAGAIN in case it happens
for some other reason than data not being ready while not using
insane amounts of CPU if the reads happen to be to some non-blocking source
(even though it does not usually make sense to use url_read_complete
on non-blocking sources).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eagain.diff
Type: text/x-diff
Size: 1026 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100124/3c56f53c/attachment.diff>



More information about the ffmpeg-devel mailing list