vf_scale.c: propagate error code
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 1 Oct 2011 01:16:32 +0000 (03:16 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 1 Oct 2011 19:03:57 +0000 (21:03 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8447703c16b9e6fdc48ce92553ec1cfa2e359b84)

libavfilter/vf_scale.c

index ba8f9e1..8f2f1d5 100644 (file)
@@ -229,7 +229,7 @@ static int config_props(AVFilterLink *outlink)
     scale->isws[1] = sws_getContext(inlink ->w, inlink ->h/2, inlink ->format,
                                     outlink->w, outlink->h/2, outlink->format,
                                     scale->flags, NULL, NULL, NULL);
-    if (!scale->sws)
+    if (!scale->sws || !scale->isws[0] || !scale->isws[1])
         return AVERROR(EINVAL);
 
     if (inlink->sample_aspect_ratio.num){