diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-12-03 16:43:10 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-12-04 20:25:15 +0100 |
commit | 2f26f3de780167c66f89ee74768fc82c1f599814 (patch) | |
tree | bc37afdcee3d10c4dc4a88a3313259c86b9df4a9 | |
parent | e9003828dd7ea167133266e3c6bd7a8f3ed200fb (diff) | |
download | ffmpeg-2f26f3de780167c66f89ee74768fc82c1f599814.tar.gz |
avcodec/flacdsp_template: Fix undefined shift in flac_decorrelate_indep_c
Fixes: left shift of negative value
Fixes: 668346-media
Found-by: Matt Wolenetz <wolenetz@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit acc163c6ab52d2235767852262c64c7f6b273d1c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/flacdsp_template.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/flacdsp_template.c b/libavcodec/flacdsp_template.c index 62c0a15ff6..776c78da71 100644 --- a/libavcodec/flacdsp_template.c +++ b/libavcodec/flacdsp_template.c @@ -56,7 +56,7 @@ static void FUNC(flac_decorrelate_indep_c)(uint8_t **out, int32_t **in, for (j = 0; j < len; j++) for (i = 0; i < channels; i++) - S(samples, i, j) = in[i][j] << shift; + S(samples, i, j) = (int)((unsigned)in[i][j] << shift); } static void FUNC(flac_decorrelate_ls_c)(uint8_t **out, int32_t **in, |