diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2013-10-14 07:41:45 +0400 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2013-10-22 12:49:31 +0400 |
commit | f825d42bccdb9f89669a586951de7f66a81e80a5 (patch) | |
tree | c03aa603a824edff05928d81cb0406b45e97a0ae /cmdutils.c | |
parent | ea71aafd6881d7ce5cffec56feb45488e3ac5221 (diff) |
avplay: Accept cpuflags option
Quite useful for debugging.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'cmdutils.c')
-rw-r--r-- | cmdutils.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cmdutils.c b/cmdutils.c index 062d7ec2f8..d6eb981205 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -43,6 +43,7 @@ #include "libavutil/eval.h" #include "libavutil/dict.h" #include "libavutil/opt.h" +#include "libavutil/cpu.h" #include "cmdutils.h" #include "version.h" #if CONFIG_NETWORK @@ -694,6 +695,17 @@ do { \ return 0; } +int opt_cpuflags(void *optctx, const char *opt, const char *arg) +{ + int flags = av_parse_cpu_flags(arg); + + if (flags < 0) + return flags; + + av_set_cpu_flags_mask(flags); + return 0; +} + int opt_loglevel(void *optctx, const char *opt, const char *arg) { const struct { const char *name; int level; } log_levels[] = { |