diff --git a/libavcodec/iff.c b/libavcodec/iff.c
index 7a11d43..c0e4eb4 100644
|
a
|
b
|
static int ff_cmap_read_palette(AVCodecContext *avctx, uint32_t *pal)
|
| 165 | 165 | pal[i] = 0xFF000000 | gray2rgb((i * 255) >> avctx->bits_per_coded_sample); |
| 166 | 166 | } |
| 167 | 167 | } |
| | 168 | if (s->masking == MASK_HAS_TRANSPARENT_COLOR && |
| | 169 | s->transparency < 1 << avctx->bits_per_coded_sample) |
| | 170 | pal[s->transparency] &= 0xFFFFFF; |
| 168 | 171 | return 0; |
| 169 | 172 | } |
| 170 | 173 | |
| … |
… |
static int extract_header(AVCodecContext *const avctx,
|
| 216 | 219 | s->flags = bytestream_get_byte(&buf); |
| 217 | 220 | s->transparency = bytestream_get_be16(&buf); |
| 218 | 221 | s->masking = bytestream_get_byte(&buf); |
| 219 | | if (s->masking == MASK_HAS_TRANSPARENT_COLOR) { |
| 220 | | av_log(avctx, AV_LOG_ERROR, "Transparency not supported\n"); |
| 221 | | return AVERROR_PATCHWELCOME; |
| 222 | | } else if (s->masking != MASK_NONE) { |
| | 222 | if (s->masking != MASK_NONE && s->masking != MASK_HAS_TRANSPARENT_COLOR) { |
| 223 | 223 | av_log(avctx, AV_LOG_ERROR, "Masking not supported\n"); |
| 224 | 224 | return AVERROR_PATCHWELCOME; |
| 225 | 225 | } |