[FFmpeg-cvslog] cmdutils: add missing NULL check in parse_options()

Stefano Sabatini git at videolan.org
Mon Jun 13 04:43:14 CEST 2011


ffmpeg | branch: master | Stefano Sabatini <stefano.sabatini-lala at poste.it> | Sun Jun 12 13:54:22 2011 +0200| [de859358830cfd1daffb1773f6bb069659027321] | committer: Anton Khirnov

cmdutils: add missing NULL check in parse_options()

Fix ffplay -i FILE, which was recently broken.

Signed-off-by: Anton Khirnov <anton at khirnov.net>

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

 cmdutils.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/cmdutils.c b/cmdutils.c
index b9a5d1b..c73d5a1 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);



More information about the ffmpeg-cvslog mailing list