Commit dccdd93e authored by Stefano Sabatini's avatar Stefano Sabatini
Browse files

Make config_props() return AVERROR(EINVAL) rather than 1 in case of

failed SWScaleContext initialization.

Fix issue2546.

Originally committed as revision 26395 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 8032d1de
...@@ -138,8 +138,10 @@ static int config_props(AVFilterLink *outlink) ...@@ -138,8 +138,10 @@ static int config_props(AVFilterLink *outlink)
scale->sws = sws_getContext(inlink ->w, inlink ->h, inlink ->format, scale->sws = sws_getContext(inlink ->w, inlink ->h, inlink ->format,
outlink->w, outlink->h, outlink->format, outlink->w, outlink->h, outlink->format,
scale->flags, NULL, NULL, NULL); scale->flags, NULL, NULL, NULL);
if (!scale->sws)
return AVERROR(EINVAL);
return !scale->sws; return 0;
} }
static void start_frame(AVFilterLink *link, AVFilterBufferRef *picref) static void start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment