On 27 July 2010 01:16, Martin Storsjö <[email protected]> wrote: > On Tue, 27 Jul 2010, Josh Allmann wrote: > >> This patch increases compatibility with the Theora spec by allowing >> the SDP to specify the sampling/pix_fmt. The sampling parameter is >> technically required by the spec, but the depacketizer still works >> fine if the SDP omits it. > > You forgot to attach the patch... >
Indeed.
From 859563133fd86c61fa67baa67cf4082838a8ce04 Mon Sep 17 00:00:00 2001 From: Josh Allmann <[email protected]> Date: Tue, 27 Jul 2010 00:50:27 -0700 Subject: [PATCH 2/2] Enhance spec compliance: add pix_fmt handling to RTP depacketizer for Theora. --- libavformat/rtpdec_xiph.c | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/libavformat/rtpdec_xiph.c b/libavformat/rtpdec_xiph.c index 306971b..ec7ce8c 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. */ -- 1.7.0.4
_______________________________________________ FFmpeg-soc mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc
