avcodec/pcm: Fix undefined shifts
Fixes the acodec-pcm-u16[lb]e FATE-tests.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
(cherry picked from commit 69473bec6f)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
7a6c286d1f
commit
8c49f5715c
1 changed files with 2 additions and 2 deletions
|
|
@ -293,7 +293,7 @@ static av_cold int pcm_decode_close(AVCodecContext *avctx)
|
|||
#define DECODE(size, endian, src, dst, n, shift, offset) \
|
||||
for (; n > 0; n--) { \
|
||||
uint ## size ## _t v = bytestream_get_ ## endian(&src); \
|
||||
AV_WN ## size ## A(dst, (v - offset) << shift); \
|
||||
AV_WN ## size ## A(dst, (uint ## size ## _t)(v - offset) << shift); \
|
||||
dst += size / 8; \
|
||||
}
|
||||
|
||||
|
|
@ -304,7 +304,7 @@ static av_cold int pcm_decode_close(AVCodecContext *avctx)
|
|||
dst = frame->extended_data[c]; \
|
||||
for (i = n; i > 0; i--) { \
|
||||
uint ## size ## _t v = bytestream_get_ ## endian(&src); \
|
||||
AV_WN ## size ## A(dst, (v - offset) << shift); \
|
||||
AV_WN ## size ## A(dst, (uint ## size ##_t)(v - offset) << shift); \
|
||||
dst += size / 8; \
|
||||
} \
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue