ARM: allow runtime masking of CPU features
[ffmpeg.git] / libavcodec / arm / mpegaudiodsp_init_arm.c
index 94a5578..a9804e9 100644 (file)
@@ -19,6 +19,8 @@
  */
 
 #include <stdint.h>
+
+#include "libavutil/arm/cpu.h"
 #include "libavcodec/mpegaudiodsp.h"
 #include "config.h"
 
@@ -27,7 +29,9 @@ void ff_mpadsp_apply_window_fixed_armv6(int32_t *synth_buf, int32_t *window,
 
 void ff_mpadsp_init_arm(MPADSPContext *s)
 {
-    if (HAVE_ARMV6) {
+    int cpu_flags = av_get_cpu_flags();
+
+    if (have_armv6(cpu_flags)) {
         s->apply_window_fixed = ff_mpadsp_apply_window_fixed_armv6;
     }
 }