diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-09-04 00:33:49 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-09-05 15:14:09 +0200 |
commit | a3ad51e0d5b3ff6634c1be6322ce82c17105e82b (patch) | |
tree | 7fef49783888fc9838209f9dbbb88dd6b4c96455 | |
parent | 7eab904d11dedfdcdf4d22ed1116cc148ca40b59 (diff) | |
download | ffmpeg-a3ad51e0d5b3ff6634c1be6322ce82c17105e82b.tar.gz |
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>
-rw-r--r-- | libavfilter/af_amerge.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/af_amerge.c b/libavfilter/af_amerge.c index 9c3cfed9f4..410d6134d7 100644 --- a/libavfilter/af_amerge.c +++ b/libavfilter/af_amerge.c @@ -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; |