Revision 03f8fc08

View differences:

libavformat/rtsp.c
1381 1381
    char host[1024], path[1024], tcpname[1024], cmd[2048], auth[128];
1382 1382
    char *option_list, *option, *filename;
1383 1383
    URLContext *rtsp_hd;
1384
    int port, err;
1384
    int port, err, tcp_fd;
1385 1385
    RTSPMessageHeader reply1, *reply = &reply1;
1386 1386
    int lower_transport_mask = 0;
1387 1387
    char real_challenge[64];
1388
    struct sockaddr_storage peer;
1389
    socklen_t peer_len = sizeof(peer);
1388 1390

  
1389 1391
    if (!ff_network_init())
1390 1392
        return AVERROR(EIO);
......
1455 1457
    rt->rtsp_hd = rtsp_hd;
1456 1458
    rt->seq = 0;
1457 1459

  
1460
    tcp_fd = url_get_file_handle(rtsp_hd);
1461
    if (!getpeername(tcp_fd, (struct sockaddr*) &peer, &peer_len)) {
1462
        getnameinfo((struct sockaddr*) &peer, peer_len, host, sizeof(host),
1463
                    NULL, 0, NI_NUMERICHOST);
1464
    }
1465

  
1458 1466
    /* request options supported by the server; this also detects server
1459 1467
     * type */
1460 1468
    av_strlcpy(rt->control_uri, s->filename,

Also available in: Unified diff