summaryrefslogtreecommitdiff
path: root/libavformat/sdp.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2010-12-20 20:46:40 +0000
committerMartin Storsjö <martin@martin.st>2010-12-20 20:46:40 +0000
commit9b14ec5fae2a49931d5a66a86b200161263e8039 (patch)
treee230b6331569a2971811200e089f935838165c90 /libavformat/sdp.c
parent9100d4d6327b077c44e5fdbc8082255f11953978 (diff)
sdp: Add a framesize attribute to H.263 SDP descriptions
While not mentioned in RFC 4629, this is required for H.263 in 3GPP TS 26.234. It is in practice required for playback with Android stagefright and on Samsung bada phones. Originally committed as revision 26062 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/sdp.c')
-rw-r--r--libavformat/sdp.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libavformat/sdp.c b/libavformat/sdp.c
index 35cbabc60a..872e76c5ae 100644
--- a/libavformat/sdp.c
+++ b/libavformat/sdp.c
@@ -314,7 +314,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) {