# HG changeset patch # User lu_zero # Date 1184274753 0 # Node ID 6dade35dc9b3cc8598b768d2f2f810e31cefbfb9 # Parent 223a74395827d070f1ed348bd2ab3c4b769abc91 rtsp multicast fix by Thijs Vermeir $1$2@gmail.com diff -r 223a74395827 -r 6dade35dc9b3 rtsp.c --- a/rtsp.c Wed Jul 11 13:37:07 2007 +0000 +++ b/rtsp.c Thu Jul 12 21:12:33 2007 +0000 @@ -1019,15 +1019,13 @@ 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;