[FFmpeg-devel] UDP Timeout
JULIAN GARDNER
joolzg at btinternet.com
Sun Jun 5 16:01:26 CEST 2011
----- Original Message -----
> From: Michael Niedermayer <michaelni at gmx.at>
> To: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org>
> Cc:
> Sent: Saturday, 4 June 2011, 15:48
> Subject: Re: [FFmpeg-devel] UDP Timeout
>
> On Sat, Jun 04, 2011 at 04:41:55PM +0200, Michael Niedermayer wrote:
>> On Sat, Jun 04, 2011 at 02:07:14PM +0100, JULIAN GARDNER wrote:
>> >
>> >
>> >
>> > >________________________________
>> > >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
>> > >?
>> [...]
>> > 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.
>>
>> i know, we misunderstand each other
>> 1 second is too short for a timeout that results after your patch
>> i understand it doesnt timeout before your patch
>>
>> also maybe ff_network_wait_fd() should not be run after the select
>> loop
>
> also the AVIO_FLAG_NONBLOCK flag should be used to select behavior
>
> [...]
>
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> In fact, the RIAA has been known to suggest that students drop out
> of college or go to community college in order to be able to afford
> settlements. -- The RIAA
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
OK ive changed the code to use the ff_network_wait_fd, and added a timeout counter, mainly for the reason that is we have no data coming in ffmpeg just waits forever
joolz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: udp.diff
Type: application/octet-stream
Size: 1922 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110605/e7cf567c/attachment.obj>
More information about the ffmpeg-devel
mailing list