]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/sdp.c
movenc: remove uses of deprecated API.
[ffmpeg] / libavformat / sdp.c
index 35cbabc60a955d28dd96ad1adb9127c0b331225c..2a8821815a2d462e8ed3b157025774ea7d0c1844 100644 (file)
@@ -21,6 +21,7 @@
 #include <string.h>
 #include "libavutil/avstring.h"
 #include "libavutil/base64.h"
+#include "libavutil/parseutils.h"
 #include "libavcodec/xiph.h"
 #include "avformat.h"
 #include "internal.h"
@@ -136,7 +137,7 @@ static int sdp_get_address(char *dest_addr, int size, int *ttl, const char *url)
     if (p) {
         char buff[64];
 
-        if (find_info_tag(buff, sizeof(buff), "ttl", p)) {
+        if (av_find_info_tag(buff, sizeof(buff), "ttl", p)) {
             *ttl = strtol(buff, NULL, 10);
         } else {
             *ttl = 5;
@@ -314,7 +315,14 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c,
             break;
         case CODEC_ID_H263:
         case CODEC_ID_H263P:
-            av_strlcatf(buff, size, "a=rtpmap:%d H263-2000/90000\r\n", payload_type);
+            /* a=framesize is required by 3GPP TS 26.234 (PSS). It
+             * actually specifies the maximum video size, but we only know
+             * the current size. This is required for playback on Android
+             * stagefright and on Samsung bada. */
+            av_strlcatf(buff, size, "a=rtpmap:%d H263-2000/90000\r\n"
+                                    "a=framesize:%d %d-%d\r\n",
+                                    payload_type,
+                                    payload_type, c->width, c->height);
             break;
         case CODEC_ID_MPEG4:
             if (c->extradata_size) {