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

Clément Bœsch u at pkh.me
Sun Oct 19 13:50:56 CEST 2014


On Sun, Oct 19, 2014 at 01:39:36PM +0200, Reimar Döffinger wrote:
> On 18.10.2014, at 22:53, git at 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 difference?

I have no idea either, it probably doesn't make any.

I saw this:
  http://lists.libav.org/pipermail/libav-devel/2014-October/064012.html

and then...
  http://lists.libav.org/pipermail/libav-devel/2014-October/064072.html

Probably just a mistake or a misunderstanding.

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-cvslog/attachments/20141019/60f906c9/attachment.asc>


More information about the ffmpeg-cvslog mailing list