1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-24 13:56:33 +02:00

avfilter/af_sofalizer: avoid casting

Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
Paul B Mahol 2017-05-18 22:49:04 +02:00
parent e434840fd4
commit 79bf4d1450

View File

@ -383,13 +383,13 @@ static int parse_channel_name(char **arg, int *rchannel, char *buf)
layout0 = layout = av_get_channel_layout(buf);
/* channel_id <- first set bit in layout */
for (i = 32; i > 0; i >>= 1) {
if (layout >= (int64_t)1 << i) {
if (layout >= 1LL << i) {
channel_id += i;
layout >>= i;
}
}
/* reject layouts that are not a single channel */
if (channel_id >= 64 || layout0 != (int64_t)1 << channel_id)
if (channel_id >= 64 || layout0 != 1LL << channel_id)
return AVERROR(EINVAL);
*rchannel = channel_id;
*arg += len;