diff options
author | Mike Melanson <mike@multimedia.cx> | 2012-01-30 09:24:41 +0400 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-01-30 10:30:21 +0400 |
commit | b864b38397a2962d265ad39005265bac4fb001ef (patch) | |
tree | a9db8c5f8a93491c80f28a5c84d978b8d79b0fa0 /libavformat | |
parent | af79a0c48a41fd99b674b39ac509ae442974715d (diff) |
yuv4mpeg: allow YUV4MPEG2 demuxer to recognize 'C420' colorspace.
Current demuxer recognizes several colorspace formats that begin with 'C420'
but does not yet recognize plain 'C420'. GStreamer's y4menc component
generates .y4m files with a 'C420' colorspace. This new comparison is
placed after the other 'C420' checks so that it doesn't interfere with
them.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/yuv4mpeg.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/yuv4mpeg.c b/libavformat/yuv4mpeg.c index afb5bfaab2..df0fc8f1a5 100644 --- a/libavformat/yuv4mpeg.c +++ b/libavformat/yuv4mpeg.c @@ -244,6 +244,9 @@ static int yuv4_read_header(AVFormatContext *s) } else if (strncmp("420paldv", tokstart, 8) == 0) { pix_fmt = PIX_FMT_YUV420P; chroma_sample_location = AVCHROMA_LOC_TOPLEFT; + } else if (strncmp("420", tokstart, 3) == 0) { + pix_fmt = PIX_FMT_YUV420P; + chroma_sample_location = AVCHROMA_LOC_CENTER; } else if (strncmp("411", tokstart, 3) == 0) pix_fmt = PIX_FMT_YUV411P; else if (strncmp("422", tokstart, 3) == 0) |