[FFmpeg-devel] [PATCH] rtsp - alternate protocol

Michael Niedermayer michaelni
Fri Dec 28 16:59:16 CET 2007


On Fri, Dec 28, 2007 at 04:29:03PM +0100, Luca Barbato wrote:
> M?ns Rullg?rd wrote:
> > Luca Barbato <lu_zero at gentoo.org> writes:
> > 
> >> Ronald S. Bultje wrote:
> >>> Hi,
> >>>
> >>> attached patch allows the rtsp module to retry with alternate protocols if
> >>> the first try fails. This allows the default setup to work with both
> >>> UDP-only and TCP-only servers, even if the default is set to the wrong one.
> >>>
> >> Could you try to use something different than a goto?
> > 
> > What's to complain about regarding that goto?
> 
> I don't like the way it is used here.
> 
> Ideally the best would be something that iterates over using a while.
> 
> That would make simpler and less cluttered add more transports later.

I dont understand why you need a goto or while() ?

a simple:
if(protocol_mask & BLAH_UDP){
    try udp
    if(succeess)
        return 0
}
if(protocol_mask & BLAH_TCP){
    try tcp
    if(succeess)
        return 0;
}
return ESOME_APPROPRIAT_EERROR;

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I hate to see young programmers poisoned by the kind of thinking
Ulrich Drepper puts forward since it is simply too narrow -- Roman Shaposhnik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071228/cde632af/attachment.pgp>



More information about the ffmpeg-devel mailing list