aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2011-06-12 13:54:22 +0200
committerAnton Khirnov <anton@khirnov.net>2011-06-12 14:19:45 +0200
commitde859358830cfd1daffb1773f6bb069659027321 (patch)
treef0c2a4e6f7db48a80e7aaaa77465b81f13f9f339
parent2f2c60400a4e383b6aa7db64d6032a42c2725882 (diff)
downloadffmpeg-de859358830cfd1daffb1773f6bb069659027321.tar.gz
cmdutils: add missing NULL check in parse_options()
Fix ffplay -i FILE, which was recently broken. Signed-off-by: Anton Khirnov <anton@khirnov.net>
-rw-r--r--cmdutils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmdutils.c b/cmdutils.c
index b9a5d1b069..c73d5a1ca2 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -277,7 +277,7 @@ unknown_opt:
*po->u.int64_arg = parse_number_or_die(opt, arg, OPT_INT64, INT64_MIN, INT64_MAX);
} else if (po->flags & OPT_FLOAT) {
*po->u.float_arg = parse_number_or_die(opt, arg, OPT_FLOAT, -INFINITY, INFINITY);
- } else {
+ } else if (po->u.func_arg) {
if (po->u.func_arg(opt, arg) < 0) {
fprintf(stderr, "%s: failed to set value '%s' for option '%s'\n", argv[0], arg, opt);
exit(1);