[FFmpeg-devel] [PATCH] avfilter/af_amerge: avoid undefined shift (<<64) in outlayout setup
Michael Niedermayer
michaelni at gmx.at
Sat Sep 5 15:15:52 CEST 2015
On Thu, Sep 03, 2015 at 04:09:05PM -0700, Ganesh Ajjanagadde wrote:
> On Thu, Sep 3, 2015 at 3:33 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > From: Michael Niedermayer <michael at niedermayer.cc>
> >
> > Fixes CID1322306
> >
> > Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> > ---
> > libavfilter/af_amerge.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/libavfilter/af_amerge.c b/libavfilter/af_amerge.c
> > index 9c3cfed..410d613 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;
> > --
> > 1.7.9.5
>
> LGTM
applied
thanks
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The bravest are surely those who have the clearest vision
of what is before them, glory and danger alike, and yet
notwithstanding go out to meet it. -- Thucydides
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150905/b9df1202/attachment.sig>
More information about the ffmpeg-devel
mailing list