Re: [FFmpeg-cvslog] avresample: Make sure the even check does not overflow

2014-10-19 Thread Clément Bœsch
On Sun, Oct 19, 2014 at 01:39:36PM +0200, Reimar Döffinger wrote: > On 18.10.2014, at 22:53, g...@videolan.org (Luca Barbato) wrote: > > > > static av_always_inline int even(uint64_t layout) > > { > > -return (!layout || (layout & (layout - 1))); > > +return (!layout || !!(layout & (layout

Re: [FFmpeg-cvslog] avresample: Make sure the even check does not overflow

2014-10-19 Thread Reimar Döffinger
On 18.10.2014, at 22:53, g...@videolan.org (Luca Barbato) wrote: > > static av_always_inline int even(uint64_t layout) > { > -return (!layout || (layout & (layout - 1))); > +return (!layout || !!(layout & (layout - 1))); Sorry, I feel stupid. Can someone help me, why does this make any di