]> git.sesse.net Git - ffmpeg/commitdiff
avformat/sdp: add missing FF_API_LAVF_AVCTX check
authorJames Almer <jamrial@gmail.com>
Fri, 2 Oct 2020 01:45:34 +0000 (22:45 -0300)
committerJames Almer <jamrial@gmail.com>
Fri, 2 Oct 2020 01:45:34 +0000 (22:45 -0300)
Signed-off-by: James Almer <jamrial@gmail.com>
libavformat/sdp.c

index 2ce1a62262defbd965e0720ab9283ba56b533fa3..95f3fbb8765a965b7b9bcc64651ca59e909f6c4e 100644 (file)
@@ -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