X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fyuv4mpeg.c;h=9c544e8f3a76ee675a1044fe71e5642e0a91ca18;hb=b6ff81d63b7b2940b39d8be2216a1c0f5cb353a8;hp=61c72f5d825d8b23ba91649a49bce6d54855f561;hpb=8f0768cc22788357f603695b86f5e9013652bba6;p=ffmpeg diff --git a/libavformat/yuv4mpeg.c b/libavformat/yuv4mpeg.c index 61c72f5d825..9c544e8f3a7 100644 --- a/libavformat/yuv4mpeg.c +++ b/libavformat/yuv4mpeg.c @@ -195,7 +195,7 @@ AVOutputFormat ff_yuv4mpegpipe_muxer = { #define MAX_YUV4_HEADER 80 #define MAX_FRAME_HEADER 80 -static int yuv4_read_header(AVFormatContext *s, AVFormatParameters *ap) +static int yuv4_read_header(AVFormatContext *s) { char header[MAX_YUV4_HEADER + 10]; // Include headroom for // the longest option @@ -249,6 +249,9 @@ static int yuv4_read_header(AVFormatContext *s, AVFormatParameters *ap) } 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)