static int rtcp_parse_packet(RTPDemuxContext *s, const unsigned char *buf, int len) { if (buf[1] != 200) return -1; s->last_rtcp_ntp_time = decode_be64(buf + 8); if (s->first_rtcp_ntp_time == AV_NOPTS_VALUE) s->first_rtcp_ntp_time = s->last_rtcp_ntp_time; s->last_rtcp_timestamp = decode_be32(buf + 16); return 0; }
static int rtcp_parse_packet(AVFormatContext *s1, const unsigned char *buf, int len) { RTPContext *s = s1->priv_data; if (buf[1] != 200) return -1; s->last_rtcp_ntp_time = decode_be64(buf + 8); if (s->first_rtcp_ntp_time == AV_NOPTS_VALUE) s->first_rtcp_ntp_time = s->last_rtcp_ntp_time; else if (s->first_rtcp_ntp_time > s->last_rtcp_ntp_time) //added by ivan s->first_rtcp_ntp_time = s->last_rtcp_ntp_time; s->last_rtcp_timestamp = decode_be32(buf + 16); rtcp_get_profile(s,s1->streams[0],s1->streams[1],(unsigned char *)buf); return 0; }