summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-03-05 03:14:27 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2017-03-06 16:47:17 +0100
commit835d9f299cf6b3704989a7b3eccfa1c2ec6866d9 (patch)
tree20a5b972420d3a66c8d9a7501471618086abc9ff
parenta9f9b7f5c70e80245983e67b8ed23212d9637645 (diff)
avcodec/x86/cavsdsp: Put MMX code under mmx check
Without this the FPU state becomes trashed and causes mysterious fate failures with cpuflags=0 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/x86/cavsdsp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/x86/cavsdsp.c b/libavcodec/x86/cavsdsp.c
index 4b20e655a7..e57d8be76a 100644
--- a/libavcodec/x86/cavsdsp.c
+++ b/libavcodec/x86/cavsdsp.c
@@ -565,7 +565,9 @@ av_cold void ff_cavsdsp_init_x86(CAVSDSPContext *c, AVCodecContext *avctx)
{
av_unused int cpu_flags = av_get_cpu_flags();
- cavsdsp_init_mmx(c, avctx);
+ if (X86_MMX(cpu_flags))
+ cavsdsp_init_mmx(c, avctx);
+
#if HAVE_AMD3DNOW_INLINE
if (INLINE_AMD3DNOW(cpu_flags))
cavsdsp_init_3dnow(c, avctx);