summaryrefslogtreecommitdiff
path: root/libavformat/rtsp.c
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2007-07-12 21:12:33 +0000
committerLuca Barbato <lu_zero@gentoo.org>2007-07-12 21:12:33 +0000
commitd02678eccce5072ceffb474acc9dc026d825f7cf (patch)
tree9825c740fe1b8141774a4c29cc8d15c3947a2197 /libavformat/rtsp.c
parent5d3049559af77ccfcd1b0ac60a2aa7f33bfffdf3 (diff)
rtsp multicast fix by Thijs Vermeir $1$2@gmail.com
Originally committed as revision 9611 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r--libavformat/rtsp.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index e82f359fb3..2279e446fb 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1019,15 +1019,13 @@ static int rtsp_read_header(AVFormatContext *s,
case RTSP_PROTOCOL_RTP_UDP_MULTICAST:
{
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);
if (url_open(&rtsp_st->rtp_handle, url, URL_RDWR) < 0) {
err = AVERROR_INVALIDDATA;
goto fail;