[FFmpeg-devel] [PATCH 2/2] jvdec: set alpha component

Peter Ross pross at xvid.org
Sat Nov 12 01:20:01 CET 2011


---
 libavcodec/jvdec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/jvdec.c b/libavcodec/jvdec.c
index f1fdee5..faf4a10 100644
--- a/libavcodec/jvdec.c
+++ b/libavcodec/jvdec.c
@@ -172,7 +172,7 @@ static int decode_frame(AVCodecContext *avctx,
 
     if (buf < buf_end) {
         for (i = 0; i < AVPALETTE_COUNT && buf + 3 <= buf_end; i++) {
-            s->palette[i] = AV_RB24(buf) << 2;
+            s->palette[i] = (0xFF << 24) | AV_RB24(buf) << 2;
             buf += 3;
         }
         s->palette_has_changed = 1;
-- 
1.7.7.1

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20111112/616f0ab5/attachment.asc>


More information about the ffmpeg-devel mailing list