Revision bc8763cd libavformat/rtsp.c

View differences:

libavformat/rtsp.c
1305 1305
    RTSPState *rt = s->priv_data;
1306 1306
    RTSPStream *rtsp_st;
1307 1307
    fd_set rfds;
1308
    int fd1, fd_max, n, i, ret;
1308
    int fd, fd_max, n, i, ret;
1309 1309
    struct timeval tv;
1310 1310

  
1311 1311
    for(;;) {
......
1318 1318
            if (rtsp_st->rtp_handle) {
1319 1319
                /* currently, we cannot probe RTCP handle because of
1320 1320
                 * blocking restrictions */
1321
                fd1 = url_get_file_handle(rtsp_st->rtp_handle);
1322
                if (fd1 > fd_max)
1323
                    fd_max = fd1;
1324
                FD_SET(fd1, &rfds);
1321
                fd = url_get_file_handle(rtsp_st->rtp_handle);
1322
                if (fd > fd_max)
1323
                    fd_max = fd;
1324
                FD_SET(fd, &rfds);
1325 1325
            }
1326 1326
        }
1327 1327
        tv.tv_sec = 0;
......
1331 1331
            for(i = 0; i < rt->nb_rtsp_streams; i++) {
1332 1332
                rtsp_st = rt->rtsp_streams[i];
1333 1333
                if (rtsp_st->rtp_handle) {
1334
                    fd1 = url_get_file_handle(rtsp_st->rtp_handle);
1335
                    if (FD_ISSET(fd1, &rfds)) {
1334
                    fd = url_get_file_handle(rtsp_st->rtp_handle);
1335
                    if (FD_ISSET(fd, &rfds)) {
1336 1336
                        ret = url_read(rtsp_st->rtp_handle, buf, buf_size);
1337 1337
                        if (ret > 0) {
1338 1338
                            *prtsp_st = rtsp_st;

Also available in: Unified diff