pp: check that the argument is not NULL as this is not supported
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 7 Jul 2012 17:14:21 +0000 (19:14 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 7 Jul 2012 17:14:21 +0000 (19:14 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libpostproc/postprocess.c

index 62eb3b2..2234ba8 100644 (file)
@@ -728,6 +728,11 @@ pp_mode *pp_get_mode_by_name_and_quality(const char *name, int quality)
     struct PPMode *ppMode;
     char *filterToken;
 
+    if (!name)  {
+        av_log(NULL, AV_LOG_ERROR, "pp: Missing argument\n");
+        return NULL;
+    }
+
     if (!strcmp(name, "help")) {
         const char *p;
         for (p = pp_help; strchr(p, '\n'); p = strchr(p, '\n') + 1) {