]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/sdp.c
xdcam hd422 720p24 fourcc in mov
[ffmpeg] / libavformat / sdp.c
index 249d19ad28ee2c45969d6cf8049826333bc6463b..a4bf7fb2028114061353bc9022468ed8fb57476e 100644 (file)
@@ -94,10 +94,10 @@ static void resolve_destination(char *dest_addr, int size, char *type,
     memset(&hints, 0, sizeof(hints));
     if (getaddrinfo(dest_addr, NULL, &hints, &ai))
         return;
-        getnameinfo(ai->ai_addr, ai->ai_addrlen, dest_addr, size,
-                    NULL, 0, NI_NUMERICHOST);
-        if (ai->ai_family == AF_INET6)
-            av_strlcpy(type, "IP6", type_size);
+    getnameinfo(ai->ai_addr, ai->ai_addrlen, dest_addr, size,
+                NULL, 0, NI_NUMERICHOST);
+    if (ai->ai_family == AF_INET6)
+        av_strlcpy(type, "IP6", type_size);
     freeaddrinfo(ai);
 }
 #else
@@ -419,6 +419,12 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c,
             av_strlcatf(buff, size, "a=rtpmap:%d VP8/90000\r\n",
                                      payload_type);
             break;
+        case CODEC_ID_ADPCM_G722:
+            if (payload_type >= RTP_PT_PRIVATE)
+                av_strlcatf(buff, size, "a=rtpmap:%d G722/%d/%d\r\n",
+                                         payload_type,
+                                         8000, c->channels);
+            break;
         default:
             /* Nothing special to do here... */
             break;
@@ -511,8 +517,7 @@ int avf_sdp_create(AVFormatContext *ac[], int n_files, char *buff, int size)
     return AVERROR(ENOSYS);
 }
 
-void ff_sdp_write_media(char *buff, int size, AVCodecContext *c,
-                        const char *dest_addr, int port, int ttl)
+void ff_sdp_write_media(char *buff, int size, AVCodecContext *c, const char *dest_addr, const char *dest_type, int port, int ttl)
 {
 }
 #endif