p += strlen(p);
r = r1;
}
- if (sps && sps_end - sps >= 4) {
+ if (sps && sps_end - sps >= 4 && p - psets <= MAX_PSET_SIZE - strlen(profile_string) - 7) {
memcpy(p, profile_string, strlen(profile_string));
p += strlen(p);
ff_data_to_hex(p, sps + 1, 3, 0);
static char *xiph_extradata2config(AVFormatContext *s, AVCodecParameters *par)
{
- char *config, *encoded_config;
+ uint8_t *config;
+ char *encoded_config;
const uint8_t *header_start[3];
int headers_len, header_len[3], config_len;
int first_header_size;
case AV_CODEC_ID_SPEEX:
av_strlcatf(buff, size, "a=rtpmap:%d speex/%d\r\n",
payload_type, p->sample_rate);
+#if FF_API_LAVF_AVCTX
+FF_DISABLE_DEPRECATION_WARNINGS
if (st->codec) {
const char *mode;
uint64_t vad_option;
av_strlcatf(buff, size, "a=fmtp:%d vbr=%s\r\n",
payload_type, mode);
}
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
break;
case AV_CODEC_ID_OPUS:
/* The opus RTP draft says that all opus streams MUST be declared
port = 0;
ttl = 0;
if (n_files == 1) {
- port = sdp_get_address(dst, sizeof(dst), &ttl, ac[0]->filename);
+ port = sdp_get_address(dst, sizeof(dst), &ttl, ac[0]->url ? ac[0]->url : "");
is_multicast = resolve_destination(dst, sizeof(dst), dst_type,
sizeof(dst_type));
if (!is_multicast)
dst[0] = 0;
for (i = 0; i < n_files; i++) {
if (n_files != 1) {
- port = sdp_get_address(dst, sizeof(dst), &ttl, ac[i]->filename);
+ port = sdp_get_address(dst, sizeof(dst), &ttl, ac[i]->url ? ac[i]->url : "");
is_multicast = resolve_destination(dst, sizeof(dst), dst_type,
sizeof(dst_type));
if (!is_multicast)