]> git.sesse.net Git - ffmpeg/commitdiff
avformat/rtsp: move SDP_MAX_SIZE macro definition to header file
authorLimin Wang <lance.lmwang@gmail.com>
Wed, 11 Nov 2020 10:26:26 +0000 (18:26 +0800)
committerLimin Wang <lance.lmwang@gmail.com>
Wed, 11 Nov 2020 10:32:56 +0000 (18:32 +0800)
move comments for the size of SDP_MAX_SIZE here:
Some SDP lines, particularly for Realmedia or ASF RTSP streams,
contain long SDP lines containing complete ASF Headers (several
kB) or arrays of MDPR (RM stream descriptor) headers plus
"rulebooks" describing their properties. Therefore, the SDP line
buffer is large.
The Vorbis FMTP line can be up to 16KB - see xiph_parse_sdp_line
in rtpdec_xiph.c.

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
libavformat/rtsp.c
libavformat/rtsp.h
libavformat/rtspenc.c

index 3bc7671a3cfce7ce9c927d94a60f484d64c6458c..3675045dbc70b78f3fde13dddcf795d5255cd76a 100644 (file)
@@ -53,7 +53,6 @@
 
 /* Default timeout values for read packet in seconds  */
 #define READ_PACKET_TIMEOUT_S 10
-#define SDP_MAX_SIZE 16384
 #define RECVBUF_SIZE 10 * RTP_MAX_PACKET_LENGTH
 #define DEFAULT_REORDERING_DELAY 100000
 
@@ -688,14 +687,6 @@ int ff_sdp_parse(AVFormatContext *s, const char *content)
 {
     const char *p;
     int letter, i;
-    /* Some SDP lines, particularly for Realmedia or ASF RTSP streams,
-     * contain long SDP lines containing complete ASF Headers (several
-     * kB) or arrays of MDPR (RM stream descriptor) headers plus
-     * "rulebooks" describing their properties. Therefore, the SDP line
-     * buffer is large.
-     *
-     * The Vorbis FMTP line can be up to 16KB - see xiph_parse_sdp_line
-     * in rtpdec_xiph.c. */
     char buf[SDP_MAX_SIZE], *q;
     SDPParseState sdp_parse_state = { { 0 } }, *s1 = &sdp_parse_state;
 
index 2b37f5b49fc2b97df7d3f3e6de3d49e8b1c785da..251ed86d195a9c82fb96d1c32662f3fee295ea9c 100644 (file)
@@ -78,6 +78,7 @@ enum RTSPControlTransport {
 #define RTSP_DEFAULT_AUDIO_SAMPLERATE 44100
 #define RTSP_RTP_PORT_MIN 5000
 #define RTSP_RTP_PORT_MAX 65000
+#define SDP_MAX_SIZE 16384
 
 /**
  * This describes a single item in the "Transport:" line of one stream as
index 97e3ef6da3c1f72d5190df76da8b1def2102ac7e..d50544456d47fd1cc5467f2d8f4c621cb88c9641 100644 (file)
@@ -34,7 +34,6 @@
 #include "libavutil/time.h"
 #include "url.h"
 
-#define SDP_MAX_SIZE 16384
 
 static const AVClass rtsp_muxer_class = {
     .class_name = "RTSP muxer",