Revision a1ba71aa

View differences:

libavformat/rtsp.c
1653 1653
    RTSPState *rt = s->priv_data;
1654 1654
    RTSPStream *rtsp_st;
1655 1655
    fd_set rfds;
1656
    int fd, fd_max, n, i, ret, tcp_fd, timeout_cnt = 0;
1656
    int fd, fd_rtcp, fd_max, n, i, ret, tcp_fd, timeout_cnt = 0;
1657 1657
    struct timeval tv;
1658 1658

  
1659 1659
    for (;;) {
......
1670 1670
        for (i = 0; i < rt->nb_rtsp_streams; i++) {
1671 1671
            rtsp_st = rt->rtsp_streams[i];
1672 1672
            if (rtsp_st->rtp_handle) {
1673
                /* currently, we cannot probe RTCP handle because of
1674
                 * blocking restrictions */
1675 1673
                fd = url_get_file_handle(rtsp_st->rtp_handle);
1676
                if (fd > fd_max)
1677
                    fd_max = fd;
1674
                fd_rtcp = rtp_get_rtcp_file_handle(rtsp_st->rtp_handle);
1675
                if (FFMAX(fd, fd_rtcp) > fd_max)
1676
                    fd_max = FFMAX(fd, fd_rtcp);
1678 1677
                FD_SET(fd, &rfds);
1678
                FD_SET(fd_rtcp, &rfds);
1679 1679
            }
1680 1680
        }
1681 1681
        tv.tv_sec = 0;
......
1687 1687
                rtsp_st = rt->rtsp_streams[i];
1688 1688
                if (rtsp_st->rtp_handle) {
1689 1689
                    fd = url_get_file_handle(rtsp_st->rtp_handle);
1690
                    if (FD_ISSET(fd, &rfds)) {
1690
                    fd_rtcp = rtp_get_rtcp_file_handle(rtsp_st->rtp_handle);
1691
                    if (FD_ISSET(fd_rtcp, &rfds) || FD_ISSET(fd, &rfds)) {
1691 1692
                        ret = url_read(rtsp_st->rtp_handle, buf, buf_size);
1692 1693
                        if (ret > 0) {
1693 1694
                            *prtsp_st = rtsp_st;

Also available in: Unified diff