]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/sdp.c
lavf/rtp_h261: Replace restrict with av_restrict.
[ffmpeg] / libavformat / sdp.c
index 5bf9de6f8459b98fde0f4d236bcb572cdbb28ac4..4d621c7ffc97820d8019db9cca1ee6c747b2ced0 100644 (file)
@@ -348,7 +348,7 @@ static char *extradata2config(AVCodecContext *c)
 static char *xiph_extradata2config(AVCodecContext *c)
 {
     char *config, *encoded_config;
-    uint8_t *header_start[3];
+    const uint8_t *header_start[3];
     int headers_len, header_len[3], config_len;
     int first_header_size;
 
@@ -504,9 +504,10 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c,
             /* only QCIF and CIF are specified as supported in RFC 4587 */
             if (c->width == 176 && c->height == 144)
                 pic_fmt = "QCIF=1";
-            if (c->width == 352 && c->height == 288)
+            else if (c->width == 352 && c->height == 288)
                 pic_fmt = "CIF=1";
-            av_strlcatf(buff, size, "a=rtpmap:%d H261/90000\r\n", payload_type);
+            if (payload_type >= RTP_PT_PRIVATE)
+                av_strlcatf(buff, size, "a=rtpmap:%d H261/90000\r\n", payload_type);
             if (pic_fmt)
                 av_strlcatf(buff, size, "a=fmtp:%d %s\r\n", payload_type, pic_fmt);
             break;