diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2021-05-02 15:49:55 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-09-11 21:23:49 +0200 |
commit | 2a5d44e3cb461a172e4bbb86de1fd9ee9ad42a32 (patch) | |
tree | b174b75c318ec94170e36121c722e0f3014eeb6a | |
parent | 0a123f3b676733e9b9dba5b6cb27bd8590fb3824 (diff) | |
download | ffmpeg-2a5d44e3cb461a172e4bbb86de1fd9ee9ad42a32.tar.gz |
avcodec/jpeglsdec: Set alpha plane in PAL8 so image is not 100% transparent
Fixes: tickets/3933/128.jls
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 011006874cb46325b6bc83234f81879ff421c05f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/jpeglsdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/jpeglsdec.c b/libavcodec/jpeglsdec.c index de1875ce30..a8d9eaa18a 100644 --- a/libavcodec/jpeglsdec.c +++ b/libavcodec/jpeglsdec.c @@ -122,7 +122,7 @@ int ff_jpegls_decode_lse(MJpegDecodeContext *s) s->avctx->pix_fmt = AV_PIX_FMT_PAL8; 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)); } |