avplay: Accept cpuflags option

Quite useful for debugging.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
Luca Barbato
2013-10-14 05:41:45 +02:00
parent ea71aafd68
commit f825d42bcc
7 changed files with 22 additions and 19 deletions

View File

@ -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[] = {