avidec: avoid infinite loop due to negative ast->sample_size
[ffmpeg.git] / libavcodec / arm / vc1dsp_init_arm.c
index 4a84848..5f2c759 100644 (file)
 
 #include "libavutil/attributes.h"
 #include "libavutil/arm/cpu.h"
+#include "libavcodec/arm/startcode.h"
 #include "libavcodec/vc1dsp.h"
 #include "vc1dsp.h"
 
-int ff_startcode_find_candidate_armv6(const uint8_t *buf, int size);
-
 av_cold void ff_vc1dsp_init_arm(VC1DSPContext *dsp)
 {
     int cpu_flags = av_get_cpu_flags();
 
-    if (have_armv6(cpu_flags))
-        dsp->vc1_find_start_code_candidate = ff_startcode_find_candidate_armv6;
+#if HAVE_ARMV6
+    if (have_setend(cpu_flags))
+        dsp->startcode_find_candidate = ff_startcode_find_candidate_armv6;
+#endif
     if (have_neon(cpu_flags))
         ff_vc1dsp_init_neon(dsp);
 }