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>
pull/149/head
Michael Niedermayer 9 years ago
parent 7eab904d11
commit a3ad51e0d5
  1. 4
      libavfilter/af_amerge.c

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

Loading…
Cancel
Save