[FFmpeg-devel] [PATCH 3/3] Non-blocking protocols: TCP

Ronald S. Bultje rsbultje
Tue Feb 1 17:00:42 CET 2011


Hi,

On Sat, Jan 29, 2011 at 3:03 PM, Nicolas George
<nicolas.george at normalesup.org> wrote:
> +static int tcp_wait_fd(int fd, int write)
> +{
> + ? ?struct pollfd p = { .fd = fd, .events = POLLOUT, .revents = 0 };
> + ? ?int ret;
> +
> + ? ?ret = poll(&p, 1, 100);
> + ? ?return ret < 0 ? ff_neterrno() : 0;
> +}

The 100ms needs to become a settable AVOption (in the future).

I like this patch, but removing the loop from the read/write and
splitting the poll into its own function would be easier in two
functions. One can be applied right now, the other I'd like to review
a little more carefully (together with #2).

Ronald

Ronald



More information about the ffmpeg-devel mailing list