/* Was the payload type already specified for the RTP muxer? */
if (ofmt && ofmt->priv_class) {
- int payload_type = av_get_int(fmt->priv_data, "payload_type", NULL);
- if (payload_type >= 0)
- return payload_type;
+ int64_t payload_type;
+ if (av_opt_get_int(fmt->priv_data, "payload_type", 0, &payload_type) >= 0 &&
+ payload_type >= 0)
+ return (int)payload_type;
}
/* static payload type */
for (i = 0; AVRtpPayloadTypes[i].pt >= 0; ++i)
if (AVRtpPayloadTypes[i].codec_id == codec->codec_id) {
- if (codec->codec_id == CODEC_ID_H263)
+ if (codec->codec_id == CODEC_ID_H263 && (!fmt ||
+ !fmt->oformat->priv_class ||
+ !av_opt_flag_is_set(fmt->priv_data, "rtpflags", "rfc2190")))
continue;
if (codec->codec_id == CODEC_ID_PCM_S16BE)
if (codec->channels != AVRtpPayloadTypes[i].audio_channels)