Mercurial > libavformat.hg
diff rtpdec_xiph.c @ 6332:2f14ee83c673 libavformat
rtpdec_xiph: Handle the sampling SDP parameter
Patch by Josh Allmann, joshua dot allmann at gmail
| author | mstorsjo |
|---|---|
| date | Wed, 28 Jul 2010 06:43:58 +0000 |
| parents | 408722fc3bf1 |
| children | 491eea5c52d6 |
line wrap: on
line diff
--- a/rtpdec_xiph.c Wed Jul 28 05:48:48 2010 +0000 +++ b/rtpdec_xiph.c Wed Jul 28 06:43:58 2010 +0000 @@ -293,7 +293,17 @@ 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. */
