Browse code

Return AVERROR(EINVAL) rather than -1 in case of invalid values.

Originally committed as revision 25274 to svn://svn.ffmpeg.org/ffmpeg/trunk

Stefano Sabatini authored on 2010/10/01 05:24:49
Showing 1 changed files
... ...
@@ -39,7 +39,7 @@ static int init(AVFilterContext *ctx, const char *args, void *opaque)
39 39
 
40 40
     if (priv->w <= 0 || priv->h <= 0) {
41 41
         av_log(ctx, AV_LOG_ERROR, "Non-positive size values are not acceptable.\n");
42
-        return -1;
42
+        return AVERROR(EINVAL);
43 43
     }
44 44
 
45 45
     return 0;