[FFmpeg-devel] [PATCH] remove loop in udp_read

aviad rozenhek aviadr1
Thu Sep 16 18:14:06 CEST 2010

the file udp.c provides a very useful API for handling udp traffic,
specifically I use it for handling raw mpegts packets.
however the fact the udp_read blocks forever makes it less useful in case no
traffic comes in.

I modified udp_read to return AVERROR(EAGAIN) in case there is currently no
data available,
and compensated for that by looping in two places in aviobuf.c

patch attached

Aviad Rozenhek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: remove_udp_read_loop.diff
Type: text/x-patch
Size: 2048 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100916/d573090f/attachment.bin>

More information about the ffmpeg-devel mailing list