diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-01-16 20:11:46 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-01-16 20:11:46 +0000 |
commit | dccdd93efc325418136eb5a3509786bc8b65aca1 (patch) | |
tree | 30b4a48bbd76ee6e7410afaa93ade1a1656137dd | |
parent | 8032d1dee9dfa855a4e03da840b72a82e2f9a86b (diff) | |
download | ffmpeg-dccdd93efc325418136eb5a3509786bc8b65aca1.tar.gz |
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
-rw-r--r-- | libavfilter/vf_scale.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c index 100ba2b6b8..3f5491321c 100644 --- a/libavfilter/vf_scale.c +++ b/libavfilter/vf_scale.c @@ -138,8 +138,10 @@ static int config_props(AVFilterLink *outlink) scale->sws = sws_getContext(inlink ->w, inlink ->h, inlink ->format, outlink->w, outlink->h, outlink->format, scale->flags, NULL, NULL, NULL); + if (!scale->sws) + return AVERROR(EINVAL); - return !scale->sws; + return 0; } static void start_frame(AVFilterLink *link, AVFilterBufferRef *picref) |