diff options
author | Paul B Mahol <onemda@gmail.com> | 2016-12-24 12:22:39 +0300 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2016-12-24 12:22:39 +0300 |
commit | 43cd33be16b21b9a217025e208f4ffbf0bf81da4 (patch) | |
tree | d404fc5c30abdbd01f91fb4bf2fb6f40d0f7a660 /libavcodec/pixlet.c | |
parent | e1b8271949d3b70e820b8e08c542ad1586c96f9d (diff) |
avcodec/pixlet: fix undefined behaviour in postprocess_chroma
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/pixlet.c')
-rw-r--r-- | libavcodec/pixlet.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/pixlet.c b/libavcodec/pixlet.c index 359c4f3f6e..1755fb81fb 100644 --- a/libavcodec/pixlet.c +++ b/libavcodec/pixlet.c @@ -479,8 +479,8 @@ static void postprocess_chroma(AVFrame *frame, int w, int h, int depth) int16_t *srcv = (int16_t *)frame->data[2]; ptrdiff_t strideu = frame->linesize[1] / 2; ptrdiff_t stridev = frame->linesize[2] / 2; - const int add = 1 << (depth - 1); - const int shift = 16 - depth; + const unsigned add = 1 << (depth - 1); + const unsigned shift = 16 - depth; int i, j; for (j = 0; j < h; j++) { |