[FFmpeg-devel] [PATCH] always enable reuse for reading multicast udp

Ronald S. Bultje rsbultje
Fri Sep 24 16:24:33 CEST 2010


On Thu, Sep 16, 2010 at 1:50 PM, aviad rozenhek <aviadr1 at gmail.com> wrote:
> On Thu, Sep 16, 2010 at 04:51, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
>
>> aviad rozenhek <aviadr1 <at> gmail.com> writes:
>>
>> > - ? ?int len;
>> > + ? ?int len, has_reuse_arg = 0;
>>
>> Being read-only, the new variable does not look useful.
>>
>>
> fixed by using it properly
>
> + ? ? ? ?if (find_info_tag(buf, sizeof(buf), "reuse", p)) {
> + ? ? ? ? ? ?s->reuse_socket = strtol(buf, NULL, 10);
> + ? ? ? ? ? ?has_reuse_arg = 1;
> + ? ? ? ?}

This code basically makes the thing semi-nonblock with a randomly
chosen timeout. As discussed in some other thread, real nonblock
should be _actually_ nonblock with proper open flags in the AV_* API
and so on. The patch is a nice quick hack but isn't OK as-is.

Ronald



More information about the ffmpeg-devel mailing list