[FFmpeg-devel] [PATCH] libavformat: Don't return errors if select is interrupted

Martin Storsjö martin
Thu Mar 4 23:23:22 CET 2010


Hi,

Currently, most network protocols wait for data with a select loop, with a 
100 ms timeout and recheck url_interrupt_cb() for each round in the loop. 
If the select is interrupted (e.g. by a signal), most of the protocols 
return an error, even if a similar interruption in recv is handled by 
retrying. The attached patch makes the protocols simply retry select if it 
returned with EINTR or EAGAIN, instead of returning an error in these 
cases. This makes the interruption behaviour consistent between select and 
recv (or send or similar).

Ronald, does this sound sensible to you?

// Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: select-interrupted.patch
Type: text/x-diff
Size: 2099 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100305/785bbc7d/attachment.patch>



More information about the ffmpeg-devel mailing list