diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-05-13 18:26:07 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-05-13 18:26:07 +0000 |
commit | 622e6ce53a8dd92ff61e64b4421a9d980675b607 (patch) | |
tree | 2ad0835e18917645cbd410d7fa909ecf4dadc4d0 | |
parent | dc0eaef318d854ba1994f761b65fb6be5f7b9433 (diff) | |
download | ffmpeg-622e6ce53a8dd92ff61e64b4421a9d980675b607.tar.gz |
Make the init and config_filter callbacks of the pad filter return
AVERROR(EINVAL) rather than -1 in case of invalid parameters.
Originally committed as revision 23121 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavfilter/vf_pad.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavfilter/vf_pad.c b/libavfilter/vf_pad.c index 44a186e9ba..2097477886 100644 --- a/libavfilter/vf_pad.c +++ b/libavfilter/vf_pad.c @@ -49,12 +49,12 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) sscanf(args, "%d:%d:%d:%d:%s", &pad->w, &pad->h, &pad->x, &pad->y, color_string); if (av_parse_color(pad->color, color_string, ctx) < 0) - return -1; + return AVERROR(EINVAL); /* sanity check params */ if (pad->w < 0 || pad->h < 0) { av_log(ctx, AV_LOG_ERROR, "Negative size values are not acceptable.\n"); - return -1; + return AVERROR(EINVAL); } return 0; @@ -178,7 +178,7 @@ static int config_input(AVFilterLink *inlink) av_log(ctx, AV_LOG_ERROR, "Input area %d:%d:%d:%d not within the padded area 0:0:%d:%d or zero-sized\n", pad->x, pad->y, pad->x + inlink->w, pad->y + inlink->h, pad->w, pad->h); - return -1; + return AVERROR(EINVAL); } return 0; |