diff mbox series

[FFmpeg-devel,4/4] avcodec/jpeglsdec: Set alpha plane in PAL8 so image is not 100% transparent

Message ID 20210502135906.12288-4-michael@niedermayer.cc
State Accepted
Commit 011006874cb46325b6bc83234f81879ff421c05f
Headers show
Series [FFmpeg-devel,1/4] Revert "avcodec/mjpegdec: fix SOF check in EOI"
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Michael Niedermayer May 2, 2021, 1:59 p.m. UTC
Fixes: tickets/3933/128.jls

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavcodec/jpeglsdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

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));
                 }