X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fsdp.c;h=95f3fbb8765a965b7b9bcc64651ca59e909f6c4e;hb=18b3deee2256a8861fd292653c8dd3ef191ef893;hp=34e9839b67aa20993132ee6237710b8a02411a5d;hpb=0084eed5bffebd7f3915bc0f9eba7350e8bc0ef7;p=ffmpeg diff --git a/libavformat/sdp.c b/libavformat/sdp.c index 34e9839b67a..95f3fbb8765 100644 --- a/libavformat/sdp.c +++ b/libavformat/sdp.c @@ -212,7 +212,7 @@ static char *extradata2psets(AVFormatContext *s, AVCodecParameters *par) 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); @@ -704,6 +704,8 @@ static char *sdp_write_media_attributes(char *buff, int size, AVStream *st, int 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; @@ -718,6 +720,8 @@ static char *sdp_write_media_attributes(char *buff, int size, AVStream *st, int 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