[FFmpeg-cvslog] r12137 - trunk/libavcodec/ppc/mpegvideo_altivec.c
Diego Biurrun
diego
Mon Feb 18 23:43:38 CET 2008
On Mon, Feb 18, 2008 at 09:53:20PM +0000, M?ns Rullg?rd wrote:
> gpoirier <subversion at mplayerhq.hu> writes:
>
> > Log:
> > fix crash on non-AltiVec powered machines: MPV_common_init_altivec doesn't check mm_flags
> > Patch by Alexander Strange %astrange A ithinksw PP com %
> >
> > --- trunk/libavcodec/ppc/mpegvideo_altivec.c (original)
> > +++ trunk/libavcodec/ppc/mpegvideo_altivec.c Mon Feb 18 22:35:31 2008
> > @@ -608,6 +608,8 @@ extern void idct_add_altivec(uint8_t *de
> >
> > void MPV_common_init_altivec(MpegEncContext *s)
> > {
> > + if (mm_flags & MM_ALTIVEC == 0) return;
>
> This is wrong. Binary & has lower precedence than ==, so this is
> effectively saying if(0) return, or in other words, it's a no-op.
gcc already said so:
ppc/mpegvideo_altivec.c: In function #MPV_common_init_altivec#:
ppc/mpegvideo_altivec.c:606: warning: suggest parentheses around comparison in operand of &
Warnings should not be ignored I guess...
Diego
More information about the ffmpeg-cvslog
mailing list