1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avfilter/af_amerge: avoid undefined shift (<<64) in outlayout setup

Fixes CID1322306

Reviewed-by: Ganesh Ajjanagadde <gajjanag@mit.edu>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2015-09-04 00:33:49 +02:00
parent 7eab904d11
commit a3ad51e0d5

View File

@ -110,8 +110,8 @@ static int query_formats(AVFilterContext *ctx)
for (i = 0; i < nb_ch; i++)
s->route[i] = i;
outlayout = av_get_default_channel_layout(nb_ch);
if (!outlayout)
outlayout = ((int64_t)1 << nb_ch) - 1;
if (!outlayout && nb_ch)
outlayout = 0xFFFFFFFFFFFFFFFFULL >> (64 - nb_ch);
} else {
int *route[SWR_CH_MAX];
int c, out_ch_number = 0;