[FFmpeg-cvslog] commit: Make config_props() return AVERROR(EINVAL) rather than 1 in case of (Stefano Sabatini )
git at videolan.org
git
Sun Jan 16 22:33:03 CET 2011
ffmpeg | branch: master | Stefano Sabatini <stefano.sabatini-lala at poste.it> | Sun Jan 16 20:11:46 2011 +0000| [dccdd93efc325418136eb5a3509786bc8b65aca1] | committer: Stefano Sabatini
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
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dccdd93efc325418136eb5a3509786bc8b65aca1
---
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 100ba2b..3f54913 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)
More information about the ffmpeg-cvslog
mailing list