vf_frei0r: prevent a segfault when filter parameters are not set
authorVittorio Giovara <vittorio.giovara@gmail.com>
Thu, 27 Feb 2014 11:06:15 +0000 (12:06 +0100)
committerReinhard Tartler <siretart@tauware.de>
Sun, 9 Mar 2014 21:53:47 +0000 (17:53 -0400)
(cherry picked from commit 4e0be9c86f2003dd3ba2eb8fad01e8d0e538075e)

libavfilter/vf_frei0r.c

index 9c6b84b..670fa18 100644 (file)
@@ -465,6 +465,10 @@ static int source_config_props(AVFilterLink *outlink)
         av_log(ctx, AV_LOG_ERROR, "Impossible to load frei0r instance");
         return AVERROR(EINVAL);
     }
+    if (!s->params) {
+        av_log(ctx, AV_LOG_ERROR, "frei0r filter parameters not set.\n");
+        return AVERROR(EINVAL);
+    }
 
     return set_params(ctx, s->params);
 }