[FFmpeg-devel] [PATCH] RTSP multicast fix
Michael Niedermayer
michaelni
Thu Jul 12 16:35:55 CEST 2007
Hi
On Mon, Jul 09, 2007 at 05:05:35PM +0200, Thijs Vermeir wrote:
> Hello all,
>
> The implementation now does not use the parameters provided by the
> RTSP encoder (Transport message). This patch fixes this by using the
> destination(multicast address), port and ttl from the RTSP transport
> message.
>
> Gr,
> Thijs
> Index: libavformat/rtsp.c
> ===================================================================
> --- libavformat/rtsp.c (revision 9556)
> +++ libavformat/rtsp.c (working copy)
> @@ -967,7 +967,7 @@
> av_strlcat(transport, ",", sizeof(transport));
> snprintf(transport + strlen(transport),
> sizeof(transport) - strlen(transport) - 1,
> - "RTP/AVP/UDP;multicast");
> + "RTP/AVP;multicast");
> }
why is this needed?
> snprintf(cmd, sizeof(cmd),
> "SETUP %s RTSP/1.0\r\n"
> @@ -1020,14 +1020,16 @@
> {
> char url[1024];
> int ttl;
> + struct in_addr in;
>
> ttl = reply->transports[0].ttl;
> if (!ttl)
> ttl = 16;
> + in.s_addr = htonl(reply->transports[0].destination);
> snprintf(url, sizeof(url), "rtp://%s:%d?multicast=1&ttl=%d",
> - host,
> - reply->transports[0].server_port_min,
> - ttl);
> + inet_ntoa(in),
> + reply->transports[0].port_min,
> + reply->transports[0].ttl);
ttl looks unused after this change
also the indention doesnt really look good
also which rtsp stream needs these changes? consideing that we have
no real maintainer for RT*P we at minimum need a proof that a change
does fix something
also if you could point to chapter/paragraph/RFC of some spec for each
change then we could much easier verify that the changes are correct
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
It is dangerous to be right in matters on which the established authorities
are wrong. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070712/dbfc2c44/attachment.pgp>
More information about the ffmpeg-devel
mailing list