aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/rtpdec_xiph.c
diff options
context:
space:
mode:
authorJosh Allmann <joshua.allmann@gmail.com>2010-07-28 06:43:58 +0000
committerMartin Storsjö <martin@martin.st>2010-07-28 06:43:58 +0000
commit42c63263d1c0ea0948c11301fbbd2c28997487d5 (patch)
tree78d1b0590e36f16a74bcac877edae3ff55d2447f /libavformat/rtpdec_xiph.c
parentf8a169ac8e247b030103b9e18d4280ff287cac98 (diff)
downloadffmpeg-42c63263d1c0ea0948c11301fbbd2c28997487d5.tar.gz
rtpdec_xiph: Handle the sampling SDP parameter
Patch by Josh Allmann, joshua dot allmann at gmail Originally committed as revision 24565 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rtpdec_xiph.c')
-rw-r--r--libavformat/rtpdec_xiph.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/libavformat/rtpdec_xiph.c b/libavformat/rtpdec_xiph.c
index bcf583fd0a..5b75529c5e 100644
--- a/libavformat/rtpdec_xiph.c
+++ b/libavformat/rtpdec_xiph.c
@@ -293,7 +293,17 @@ static int xiph_parse_fmtp_pair(AVStream* stream,
int result = 0;
if (!strcmp(attr, "sampling")) {
- return AVERROR_PATCHWELCOME;
+ if (!strcmp(value, "YCbCr-4:2:0")) {
+ codec->pix_fmt = PIX_FMT_YUV420P;
+ } else if (!strcmp(value, "YCbCr-4:4:2")) {
+ codec->pix_fmt = PIX_FMT_YUV422P;
+ } else if (!strcmp(value, "YCbCr-4:4:4")) {
+ codec->pix_fmt = PIX_FMT_YUV444P;
+ } else {
+ av_log(codec, AV_LOG_ERROR,
+ "Unsupported pixel format %s\n", attr);
+ return AVERROR_INVALIDDATA;
+ }
} else if (!strcmp(attr, "width")) {
/* This is an integer between 1 and 1048561
* and MUST be in multiples of 16. */