[FFmpeg-cvslog] r12137 - trunk/libavcodec/ppc/mpegvideo_altivec.c

Måns Rullgård mans
Mon Feb 18 22:53:20 CET 2008


gpoirier <subversion at mplayerhq.hu> writes:

> Author: gpoirier
> Date: Mon Feb 18 22:35:31 2008
> New Revision: 12137
>
> 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 %
>
> Modified:
>    trunk/libavcodec/ppc/mpegvideo_altivec.c
>
> Modified: trunk/libavcodec/ppc/mpegvideo_altivec.c
> ==============================================================================
> --- 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.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-cvslog mailing list