[FFmpeg-devel] [PATCH 4/4] avcodec/jpeglsdec: Set alpha plane in PAL8 so image is not 100% transparent
Michael Niedermayer
michael at niedermayer.cc
Sun May 2 16:59:06 EEST 2021
Fixes: tickets/3933/128.jls
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
libavcodec/jpeglsdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/jpeglsdec.c b/libavcodec/jpeglsdec.c
index bd9224d97d..c61cb14f49 100644
--- a/libavcodec/jpeglsdec.c
+++ b/libavcodec/jpeglsdec.c
@@ -124,7 +124,7 @@ int ff_jpegls_decode_lse(MJpegDecodeContext *s)
for (i=s->palette_index; i<=maxtab; i++) {
uint8_t k = i << shift;
- pal[k] = 0;
+ pal[k] = wt < 4 ? 0xFF000000 : 0;
for (j=0; j<wt; j++) {
pal[k] |= get_bits(&s->gb, 8) << (8*(wt-j-1));
}
--
2.17.1
More information about the ffmpeg-devel
mailing list