Fix yuv4mpeg parsing of 'mono16' files.
authorSteven Robertson <steven@strobe.cc>
Sun, 22 Jul 2012 07:59:25 +0000 (09:59 +0200)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Sun, 22 Jul 2012 07:59:25 +0000 (09:59 +0200)
'mono' came before 'mono16' in the list of colorspace alternatives,
causing files of the latter type to be parsed as the former.

libavformat/yuv4mpeg.c

index 90a1b06..2196750 100644 (file)
@@ -366,10 +366,10 @@ static int yuv4_read_header(AVFormatContext *s)
                 return -1;
             } else if (strncmp("444", tokstart, 3) == 0) {
                 pix_fmt = PIX_FMT_YUV444P;
-            } else if (strncmp("mono", tokstart, 4) == 0) {
-                pix_fmt = PIX_FMT_GRAY8;
             } else if (strncmp("mono16", tokstart, 6) == 0) {
                 pix_fmt = PIX_FMT_GRAY16;
+            } else if (strncmp("mono", tokstart, 4) == 0) {
+                pix_fmt = PIX_FMT_GRAY8;
             } else {
                 av_log(s, AV_LOG_ERROR, "YUV4MPEG stream contains an unknown "
                        "pixel format.\n");