[FFmpeg-devel] [PATCH] -- Add input mode autodetect to the decklink module.

Marton Balint cus at passwd.hu
Thu May 12 21:37:34 CEST 2016



On Thu, 12 May 2016, Matthias Hunstock wrote:

> Am 12.05.2016 um 19:16 schrieb Felt, Patrick:
>> +        while (!ctx->video) {
>> +            if (autodetect_delay--) {
>> +                /* this could indicate we are in the right mode.  let's assume so */
>> +                continue;
>> +            }
>> +            sleep(1);
>> +        }
>
> I don't get it. How does this loop sleep for autodetect_delay seconds? I
> read it like "spin-loop for autodetect_delay times and then probe
> ctx->video each second, possibly forever".
>

Also get rid of sleep and unistd.h, use av_usleep instead...

Regards,
Marton


More information about the ffmpeg-devel mailing list