Browse Source

avcodec/imgconvert/get_color_type: fix type for PAL8

Fixes Ticket3008

Fate changes as PAL8 gets used instead of BGR8

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.1
Michael Niedermayer 12 years ago
parent
commit
95666b2298
2 changed files with 5 additions and 2 deletions
  1. +3
    -0
      libavcodec/imgconvert.c
  2. +2
    -2
      tests/ref/lavf/gif

+ 3
- 0
libavcodec/imgconvert.c View 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;



+ 2
- 2
tests/ref/lavf/gif View 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

Loading…
Cancel
Save