diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-09-28 14:59:09 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-09-28 14:59:09 +0000 |
commit | c10676aca3815431e553a161fc694dc664f25f2d (patch) | |
tree | e597598ab25a10eff36ca83a62b81d66a8354b20 | |
parent | 46daee6e4ef8f9ae2b1642bd7d7722c0fd5a42e3 (diff) | |
download | ffmpeg-c10676aca3815431e553a161fc694dc664f25f2d.tar.gz |
Make init() return sensible error code rather than -1 in case of
invalid values.
Originally committed as revision 25248 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavfilter/vf_scale.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c index 5d015a99ba..d99e0c1dab 100644 --- a/libavfilter/vf_scale.c +++ b/libavfilter/vf_scale.c @@ -58,7 +58,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) /* sanity check params */ if (scale->w < -1 || scale->h < -1) { av_log(ctx, AV_LOG_ERROR, "Size values less than -1 are not acceptable.\n"); - return -1; + return AVERROR(EINVAL); } if (scale->w == -1 && scale->h == -1) scale->w = scale->h = 0; |