track->enc->codec_type = AVMEDIA_TYPE_DATA;
track->enc->codec_tag = track->tag;
- track->rtp_ctx = ff_rtp_chain_mux_open(s, src_st, NULL,
- RTP_MAX_PACKET_SIZE);
- if (!track->rtp_ctx)
+ ret = ff_rtp_chain_mux_open(&track->rtp_ctx, s, src_st, NULL,
+ RTP_MAX_PACKET_SIZE);
+ if (ret < 0)
goto fail;
/* Copy the RTP AVStream timebase back to the hint AVStream */
size -= 4;
if (packet_len > size || packet_len <= 12)
break;
- if (data[1] >= RTCP_SR && data[1] <= RTCP_APP) {
+ if (RTP_PT_IS_RTCP(data[1])) {
/* RTCP packet, just skip */
data += packet_len;
size -= packet_len;