summaryrefslogtreecommitdiff
path: root/libavformat/sdp.c
diff options
context:
space:
mode:
authorThomas Volkert <thomas@homer-conferencing.com>2014-10-04 00:17:01 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-10-04 00:53:13 +0200
commit1c4c78ee4073b2387681d916a167b758369b9216 (patch)
tree15d58f86a09e5d3ab1addca729cd0e22f6558546 /libavformat/sdp.c
parent075a165d2715837d125a9cc714fb430ccf6c9d6b (diff)
sdp: add support for H.261
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/sdp.c')
-rw-r--r--libavformat/sdp.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/libavformat/sdp.c b/libavformat/sdp.c
index d7429523e8..f386fcbafe 100644
--- a/libavformat/sdp.c
+++ b/libavformat/sdp.c
@@ -414,6 +414,19 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c,
payload_type, mode, config ? config : "");
break;
}
+ case AV_CODEC_ID_H261:
+ {
+ const char *pic_fmt = NULL;
+ /* 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)
+ pic_fmt = "CIF=1";
+ 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;
+ }
case AV_CODEC_ID_H263:
case AV_CODEC_ID_H263P:
/* a=framesize is required by 3GPP TS 26.234 (PSS). It