]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/yuv4mpeg.c
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / libavformat / yuv4mpeg.c
index dad29d8d550404a48b155935d14dde77df552f1e..9c544e8f3a76ee675a1044fe71e5642e0a91ca18 100644 (file)
@@ -181,7 +181,6 @@ static int yuv4_write_header(AVFormatContext *s)
 AVOutputFormat ff_yuv4mpegpipe_muxer = {
     .name              = "yuv4mpegpipe",
     .long_name         = NULL_IF_CONFIG_SMALL("YUV4MPEG pipe format"),
-    .mime_type         = "",
     .extensions        = "y4m",
     .priv_data_size    = sizeof(int),
     .audio_codec       = CODEC_ID_NONE,
@@ -196,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
@@ -250,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)