OSDN Git Service

avcodec/imgconvert/get_color_type: fix type for PAL8
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 2 Oct 2013 16:11:28 +0000 (18:11 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 2 Oct 2013 17:59:10 +0000 (19:59 +0200)
Fixes Ticket3008

Fate changes as PAL8 gets used instead of BGR8

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/imgconvert.c
tests/ref/lavf/gif

index d9dc55d..ee58cfb 100644 (file)
@@ -71,6 +71,9 @@ void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int
 }
 
 static int get_color_type(const AVPixFmtDescriptor *desc) {
+    if (desc->flags & AV_PIX_FMT_FLAG_PAL)
+        return FF_COLOR_RGB;
+
     if(desc->nb_components == 1 || desc->nb_components == 2)
         return FF_COLOR_GRAY;
 
index 531cd1e..4d90abe 100644 (file)
@@ -1,3 +1,3 @@
-e35f5ea283bbcb249818e0078ec72664 *./tests/data/lavf/lavf.gif
-2011766 ./tests/data/lavf/lavf.gif
+8aef8081e8afa445f63f320f4a1c5edb *./tests/data/lavf/lavf.gif
+2030198 ./tests/data/lavf/lavf.gif
 ./tests/data/lavf/lavf.gif CRC=0x0dc5477c