From 3518c5a96b0417f6e66bd0c8c64bd2b32d936064 Mon Sep 17 00:00:00 2001 From: Alexander Strange Date: Mon, 18 Feb 2008 21:35:31 +0000 Subject: [PATCH] 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 % Originally committed as revision 12137 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/ppc/mpegvideo_altivec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/ppc/mpegvideo_altivec.c b/libavcodec/ppc/mpegvideo_altivec.c index 0901ab5e10..3c4610df40 100644 --- a/libavcodec/ppc/mpegvideo_altivec.c +++ b/libavcodec/ppc/mpegvideo_altivec.c @@ -608,6 +608,8 @@ extern void idct_add_altivec(uint8_t *dest, int line_size, int16_t *block); void MPV_common_init_altivec(MpegEncContext *s) { + if (mm_flags & MM_ALTIVEC == 0) return; + if (s->avctx->lowres==0) { if ((s->avctx->idct_algo == FF_IDCT_AUTO) ||