The OptionDef arrays are terminated with a { NULL } element not NULL.

Bug-Id: CID 703769
CC: [email protected]
---
 cmdutils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmdutils.c b/cmdutils.c
index 96b40f3..eff011c 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -414,7 +414,7 @@ int locate_option(int argc, char **argv, const OptionDef 
*options,
              (po->name && !strcmp(optname, po->name)))
             return i;
 
-        if (!po || po->flags & HAS_ARG)
+        if (!po->name || po->flags & HAS_ARG)
             i++;
     }
     return 0;
-- 
2.1.0

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to