[FFmpeg-devel] [PATCH] add timeout to udp_read

Hagen Schmidt kragen
Wed Sep 9 22:56:30 CEST 2009


On 25.08.2009 at 00:57, Michael Niedermayer wrote:
> On Mon, Aug 24, 2009 at 10:57:07PM +0200, Hagen Schmidt wrote:
> > Hi
> >
> > On 20.08.2009 at 11:26, Luca Abeni wrote:
> > > On Thu, 2009-08-20 at 05:17 -0400, Ronald S. Bultje wrote:
> > > > Hi,
> > > >
> > > > On Thu, Aug 20, 2009 at 5:08 AM, Luca
> > > > Abeni<lucabe72 at email.it>
> >
> > wrote:
> > > > > On Mon, 2009-08-17 at 21:46 +0200, Hagen Schmidt wrote:
> > > > >> to fix issue 539 the attached patch introduces an timeout
> > > > >> [seconds] which returns while waiting for an udp stream:
> > > > >> ffplay udp://235.2.2.2:5000?recv_timeout=5
> > > > >
> > > > > Maybe this is a trivial question, but... Why cannot the
> > > > > problem be resolved by implementing the timeout at
> > > > > application level?
> > > >
> > > > It's a good suggestion, but should be implemented in ffplay
> > > > before we suggest others to do the same thing...
> > >
> > > Well, you know... Patches are welcome ;-)
> >
> > Ok, I agree, a more general solution is possible by implementing
> > the timeout in ffplay. The patch extends the callback function
> > which is used during both udp and tcp blocking read operations.
>
> iam ok with this though
> the timeout should be user configureable
> there should be a clear error message (dunno if there is one
> alraedy but id suspect not)

The updated patch incorporates both a configurable timeout and an 
additional error message (existing standard message is "Unknown 
format").

Hagen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: timeout.diff
Type: text/x-patch
Size: 2520 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090909/58de6927/attachment.bin>



More information about the ffmpeg-devel mailing list