diff options
author | James Almer <jamrial@gmail.com> | 2016-01-18 18:37:36 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2016-01-29 19:58:41 -0300 |
commit | 1bb3b90db8332dfc387c7bfecb98e53583596de1 (patch) | |
tree | b2ae5f3bb215f5bb36b2e7129c9141b918384a9b | |
parent | 8514f6dcfd29191d9ec5768eb647326a0cd4e761 (diff) | |
download | ffmpeg-1bb3b90db8332dfc387c7bfecb98e53583596de1.tar.gz |
avcodec/pngdec: use av_mod_uintp2
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r-- | libavcodec/pngdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c index 305908700b..61857d0e5c 100644 --- a/libavcodec/pngdec.c +++ b/libavcodec/pngdec.c @@ -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); |