aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2011-11-11 18:36:41 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2011-11-11 18:40:19 +0100
commite22eff964f73d8b3f4b748088635c884c36d3ed9 (patch)
tree4ae166d7141fba1df312f18e57c8038a791700a8
parent393b234fa1e21453c6e3168aa5d32ad14c3e6e5c (diff)
downloadffmpeg-e22eff964f73d8b3f4b748088635c884c36d3ed9.tar.gz
Set palette for 1bit pcx.
The stored palette contains zeroes only. Fixes ticket #637.
-rw-r--r--libavcodec/pcx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/pcx.c b/libavcodec/pcx.c
index b2d433a13d..851b205389 100644
--- a/libavcodec/pcx.c
+++ b/libavcodec/pcx.c
@@ -224,6 +224,9 @@ static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
if (nplanes == 1 && bits_per_pixel == 8) {
pcx_palette(&buf, (uint32_t *) p->data[1], 256);
+ } else if (bits_per_pixel * nplanes == 1) {
+ AV_WN32A(p->data[1] , 0xFF000000);
+ AV_WN32A(p->data[1]+4, 0xFFFFFFFF);
} else if (bits_per_pixel < 8) {
const uint8_t *palette = bufstart+16;
pcx_palette(&palette, (uint32_t *) p->data[1], 16);