diff options
Diffstat (limited to 'libavcodec/mss1.c')
-rw-r--r-- | libavcodec/mss1.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libavcodec/mss1.c b/libavcodec/mss1.c index 6eb9f1486e..4be7a1febf 100644 --- a/libavcodec/mss1.c +++ b/libavcodec/mss1.c @@ -2,20 +2,20 @@ * Microsoft Screen 1 (aka Windows Media Video V7 Screen) decoder * Copyright (c) 2012 Konstantin Shishkov * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -554,7 +554,7 @@ static int decode_pal(MSS1Context *ctx, ArithCoder *acoder) r = arith_get_bits(acoder, 8); g = arith_get_bits(acoder, 8); b = arith_get_bits(acoder, 8); - *pal++ = (r << 16) | (g << 8) | b; + *pal++ = (0xFF << 24) | (r << 16) | (g << 8) | b; } return !!ncol; @@ -575,7 +575,7 @@ static int decode_pivot(MSS1Context *ctx, ArithCoder *acoder, int base) val = arith_get_number(acoder, (base + 1) / 2 - 2) + 3; } - if (val == base) { + if ((unsigned)val >= base) { ctx->corrupted = 1; return 0; } @@ -809,7 +809,7 @@ static av_cold int mss1_decode_init(AVCodecContext *avctx) av_int2float(AV_RB32(avctx->extradata + 44))); for (i = 0; i < 256; i++) - c->pal[i] = AV_RB24(avctx->extradata + 52 + i * 3); + c->pal[i] = 0xFF << 24 | AV_RB24(avctx->extradata + 52 + i * 3); avctx->pix_fmt = PIX_FMT_PAL8; |