Revision b8dddebf

View differences:

libavfilter/vsrc_buffer.c
62 62
static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
63 63
{
64 64
    BufferSourceContext *c = ctx->priv;
65
    int n = 0;
65 66

  
66
    if (args && sscanf(args, "%d:%d:%d", &c->w, &c->h, &c->pix_fmt) == 3)
67
        return 0;
67
    if (!args || (n = sscanf(args, "%d:%d:%d", &c->w, &c->h, &c->pix_fmt)) != 3) {
68
        av_log(ctx, AV_LOG_ERROR, "Expected 3 arguments, but only %d found in '%s'\n", n, args ? args : "");
69
        return AVERROR(EINVAL);
70
    }
68 71

  
69
    av_log(ctx, AV_LOG_ERROR, "init() expected 3 arguments:'%s'\n", args);
70
    return -1;
72
    return 0;
71 73
}
72 74

  
73 75
static int query_formats(AVFilterContext *ctx)

Also available in: Unified diff