[FFmpeg-cvslog] avutil/cpu: fix cpu-test to work with ffmpegs cpuflags syntax

Michael Niedermayer git at videolan.org
Wed Aug 6 00:41:49 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Aug  6 00:35:53 2014 +0200| [1b168e3bcf6f025b7be64d9dd29dbcb54cb63042] | committer: Michael Niedermayer

avutil/cpu: fix cpu-test to work with ffmpegs cpuflags syntax

Found-by: jamrial
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1b168e3bcf6f025b7be64d9dd29dbcb54cb63042
---

 libavutil/cpu.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/libavutil/cpu.c b/libavutil/cpu.c
index 1192619..03f89cb 100644
--- a/libavutil/cpu.c
+++ b/libavutil/cpu.c
@@ -357,10 +357,11 @@ int main(int argc, char **argv)
         switch (c) {
         case 'c':
         {
-            int cpuflags = av_parse_cpu_flags(optarg);
-            if (cpuflags < 0)
+            unsigned flags = av_get_cpu_flags();
+            if (av_parse_cpu_caps(&flags, optarg) < 0)
                 return 2;
-            av_set_cpu_flags_mask(cpuflags);
+
+            av_force_cpu_flags(flags);
             break;
         }
         case 't':



More information about the ffmpeg-cvslog mailing list