Browse Source

avcodec/pngdec: use av_mod_uintp2

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
tags/n3.0
James Almer 10 years ago
parent
commit
1bb3b90db8
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/pngdec.c

+ 1
- 1
libavcodec/pngdec.c View File

@@ -787,7 +787,7 @@ static int decode_trns_chunk(AVCodecContext *avctx, PNGDecContext *s,

for (i = 0; i < length / 2; i++) {
/* only use the least significant bits */
v = bytestream2_get_be16(&s->gb) & ((1 << s->bit_depth) - 1);
v = av_mod_uintp2(bytestream2_get_be16(&s->gb), s->bit_depth);

if (s->bit_depth > 8)
AV_WB16(&s->transparent_color_be[2 * i], v);


Loading…
Cancel
Save