[FFmpeg-devel] [PATCH] RTSP-MS 8/15: fix RTSP-MS UDP (was: disallow UDP/RTSP-MS)

Michael Niedermayer michaelni
Sat Jan 31 18:35:34 CET 2009


On Sun, Jan 25, 2009 at 02:14:10PM -0500, Ronald S. Bultje wrote:
> Hi,
> 
> On Tue, Jan 6, 2009 at 12:07 AM, Ronald S. Bultje <rsbultje at gmail.com> wrote:
> > I haven't gotten UDP/RTSP-MS to work yet, so this patch explicitely
> > disallows anything else than TCP/RTSP-MS.
> 
> Attached patch fixes this, I think. Negotiation succeeds, the data is
> slightly different than for TCP but that will be handled in a
> different patch.
> 
> The patch is dirty, in a way, because for UDP in RTSP-MS:
> - the server expects the RTX stream to be SETUP'ed first, even if it's
> not the first in the SDP. (For TCP, we ignore the RTX.)
> - right now I create a RTSPStream+AVStream pair for the RTX stream. I
> could in theory just create a AVStream-less RTSPStream since the
> client doesn't need this, it's just for the session.
> - we should use two ports for the RTX, and then the next (one) for all
> data streams, so:
> 
> SETUP x.y.z/x.asf/rtx
> Transport: client_port=[x]-[x+1]
> 
> OK
> 
> SETUP x.y.z/x.asf/stream=1
> Transport: client_port=[x+2]
> 
> OK
> 
> SETUP x.y.z/x.asf/stream=2
> Transport: client_port=[x+2]
> 
> OK
> 
> (etc. for stream=3-n)
> 
> This is what wireshark dumps of MS sessions give me and it works, so I
> kept it simple for now. I tried different orders or port numbers but
> it all fails at the second or third SETUP with either a 500 (Internal
> Server Error) or a 461 (Unsupported Transport).
> 
> Ronald

> Index: ffmpeg-svn/libavformat/rtsp.c
> ===================================================================
> --- ffmpeg-svn.orig/libavformat/rtsp.c	2009-01-24 14:19:22.000000000 -0500
> +++ ffmpeg-svn/libavformat/rtsp.c	2009-01-25 09:17:45.000000000 -0500
> @@ -392,6 +392,8 @@
>              codec_type = CODEC_TYPE_AUDIO;
>          } else if (!strcmp(st_type, "video")) {
>              codec_type = CODEC_TYPE_VIDEO;
> +        } else if (!strcmp(st_type, "application")) {
> +            codec_type = CODEC_TYPE_DATA;
>          } else {
>              s1->skip_media = 1;
>              return;

i suspect this hunk is ok
the rest should be reviewed by the maintainers

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

No great genius has ever existed without some touch of madness. -- Aristotle
-------------- 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/20090131/d2ff7260/attachment.pgp>



More information about the ffmpeg-devel mailing list