[FFmpeg-devel] [PATCH] avformat/unix: properly handling timeout at reading
bodecsb at vivanet.hu
Tue Mar 20 22:04:57 EET 2018
2018.03.20. 20:58 keltezéssel, Nicolas George írta:
> Bodecs Bela (2018-03-20):
>> see the retry_transfer_wrapper() in avio.c If
>> ret = transfer_func(h, buf + len, size - len);
>> is always zero, so it gets into infinite loop.
>> transfer_func is unix_read in case of unix protocol.
> Let me be more accurate: I am pretty sure you analysis is wrong as
> recv() does not return 0 on timeout. Please tell how you came to that
I am sorry, but you misunderstood me. When recv() return 0 it means that
no data was read.
this 0 value is returned to retry_transfer_wrapper(), then it call the
it is an infinite wait if data was never read again. But if user sets a
it should quit the waiting loop after the preset time period elapsed.
this wait time checking is handled in retry_transfer_wrapper() but only
if unix_read return EAGAIN
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
More information about the ffmpeg-devel