Revision 3a1cdcc7 libavformat/rtsp.c

View differences:

libavformat/rtsp.c
1617 1617
                 * in order to map their timestamp origin to the same ntp time
1618 1618
                 * as this one. */
1619 1619
                int i;
1620
                AVStream *st = NULL;
1621
                if (rtsp_st->stream_index >= 0)
1622
                    st = s->streams[rtsp_st->stream_index];
1620 1623
                for (i = 0; i < rt->nb_rtsp_streams; i++) {
1621 1624
                    RTPDemuxContext *rtpctx2 = rt->rtsp_streams[i]->transport_priv;
1622
                    if (rtpctx2 &&
1623
                        rtpctx2->first_rtcp_ntp_time == AV_NOPTS_VALUE)
1625
                    AVStream *st2 = NULL;
1626
                    if (rt->rtsp_streams[i]->stream_index >= 0)
1627
                        st2 = s->streams[rt->rtsp_streams[i]->stream_index];
1628
                    if (rtpctx2 && st && st2 &&
1629
                        rtpctx2->first_rtcp_ntp_time == AV_NOPTS_VALUE) {
1624 1630
                        rtpctx2->first_rtcp_ntp_time = rtpctx->first_rtcp_ntp_time;
1631
                        rtpctx2->rtcp_ts_offset = av_rescale_q(
1632
                            rtpctx->rtcp_ts_offset, st->time_base,
1633
                            st2->time_base);
1634
                    }
1625 1635
                }
1626 1636
            }
1627 1637
            if (ret == -RTCP_BYE) {

Also available in: Unified diff