summaryrefslogtreecommitdiff
path: root/cmdutils.c
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2013-10-14 05:41:45 +0200
committerLuca Barbato <lu_zero@gentoo.org>2013-10-22 10:49:31 +0200
commitf825d42bccdb9f89669a586951de7f66a81e80a5 (patch)
treec03aa603a824edff05928d81cb0406b45e97a0ae /cmdutils.c
parentea71aafd6881d7ce5cffec56feb45488e3ac5221 (diff)
downloadffmpeg-f825d42bccdb9f89669a586951de7f66a81e80a5.tar.gz
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.c12
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[] = {