vf_scale.c: propagate error code

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8447703c16)
This commit is contained in:
Michael Niedermayer 2011-10-01 03:16:32 +02:00
parent f144a70d60
commit 00f6cbb53d
1 changed files with 1 additions and 1 deletions

View 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){