[FFmpeg-devel] [PATCH] avformat/unix: properly handling timeout at reading

Bodecs Bela bodecsb at vivanet.hu
Tue Mar 20 23:20:51 EET 2018



2018.03.20. 21:23 keltezéssel, Nicolas George írta:
> Bodecs Bela (2018-03-20):
>> I am sorry, but you misunderstood me. When recv() return 0 it means that no
>> data was read.
> And for the third time I am asking how you observe that. What is your
> testing procedure?
>
> Regards,
>
>
ah, sorry. Let's see the following two command lines:

a.
ffmpeg -y -re -f lavfi -i 
"aevalsrc=exprs=0:nb_samples=1024:sample_rate=44100:channel_layout=stereo, 
aformat=sample_fmts=s16" -re -f lavfi -i 
"smptehdbars=size=640x360:rate=25, format=pix_fmts=yuv420p" -c:v 
rawvideo -c:a pcm_s16le -map 0 -map 1 -disposition:0 default -t 
00:00:10.0 -f nut -listen 1 unix:doc/examples/pause.unix

b.
ffmpeg -y -f nut -rw_timeout 10000000 unix:doc/examples/pause,unix -c 
copy -f framemd5 -

start a. and in a separate terminal window start b.  After 10 seconds a. 
terminates but b. remains running on infinite time. But I expected b. to 
terminate after 1 sec (1000000 microsec) when no data received because 
a. terminated.

If you run b in debugger, you wil see that ffmpeg running in infinite 
loop in retry_transfer_wrapper() / unix_read()
With my patch b. will terminates after 1 sec as I expected.

bb


>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel



More information about the ffmpeg-devel mailing list