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

Alexandre Ferrieux alexandre.ferrieux
Thu Sep 16 18:25:30 CEST 2010


On 16/09/2010 18:14, aviad rozenhek wrote:
> 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

The following line is truncated:

+                return AVERROR(EG

Apart from that, with your proposed change, what is ffmpeg supposed
to do apart from blocking ? Busylooping ?

-Alex



More information about the ffmpeg-devel mailing list