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

Ronald S. Bultje rsbultje
Fri Dec 28 18:10:48 CET 2007


Hi,

On Dec 28, 2007 10:59 AM, Michael Niedermayer <michaelni at gmx.at> wrote:

> 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;
> }


Most code between udp, udp-multicast and tcp is shared, so this'd lead to
duplication between try udp and try tcp. The for is already there, I can
just re-use that.

I can also drop rtsp_default_mask, as Michael suggested, I actually wanted
to do that when I thought about it later, but I was already off by then. New
patch doing that attached, interested in comments on this approach.

Ronald
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: alternate-protocol.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071228/8abeaa2f/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: alternate-protocol-reindent.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071228/8abeaa2f/attachment.asc>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: remove-default-protocol.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071228/8abeaa2f/attachment-0001.txt>



More information about the ffmpeg-devel mailing list