udp: fix non-blocking and interrupt handling.
authorNicolas George <nicolas.george@normalesup.org>
Thu, 15 Mar 2012 11:19:37 +0000 (12:19 +0100)
committerNicolas George <nicolas.george@normalesup.org>
Sat, 17 Mar 2012 13:43:37 +0000 (14:43 +0100)
commit463705bd1c644bbdded7bcf9f619bcb4203d562f
tree384ffbf7e8580cfecb34fa9c2e954b90b2c2f3e9
parentd9f26a0d71e3f726cb7a764fa274aa84441a2ddb
udp: fix non-blocking and interrupt handling.

In non-blocking mode, lowest-level read protocols are
supposed block only for a short amount of time to let
retry_transfer_wrapper() check for interrupts.

Also, checking the interrupt_callback in the receiving thread is
wrong, as interrupt_callback is not guaranteed to be thread-safe
and the job is already done by retry_transfer_wrapper(). The error
code was also incorrect.

Bug reported by Andrey Utkin.
libavformat/udp.c