[FFmpeg-devel] UDP Timeout
joolzg at btinternet.com
Sat Jun 4 15:07:14 CEST 2011
>From: Michael Niedermayer <michaelni at gmx.at>
>To: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org>
>Sent: Friday, 3 June 2011, 15:10
>Subject: Re: [FFmpeg-devel] UDP Timeout
>On Fri, Jun 03, 2011 at 09:51:48AM +0100, JULIAN GARDNER wrote:
>> Seeing a small problem in that if you have a UDP stream that stops running, we dont get a timeout from either ffmpeg or ffplay, i tracked this down to udp.c, not sure if it was my version or the modified verision.
>> Small mod here to return back if the return from select is an error or a timeout, my current version ran for 86mins, with modification, 20 seconds
>thats strange, the code looks like it would timeout after 1 second
>(tv.tv_sec = 1;) with your modification
>PS: ive applied the indention fix
>Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>Everything should be made as simple as possible, but not simpler.
>-- Albert Einstein
>ffmpeg-devel mailing list
>ffmpeg-devel at ffmpeg.org
whilst your right about the 1 second timeout you will see if you look the code that the only way to leave the while loop is for an error or data to arrive.
The check <0 is only for errors, when no data is available we get a return of 0 as you said after 1 second.
Please check again.
More information about the ffmpeg-devel