Revision 94498ec9 libavfilter/vsrc_buffer.c

View differences:

libavfilter/vsrc_buffer.c
33 33
    int               has_frame;
34 34
    int               h, w;
35 35
    enum PixelFormat  pix_fmt;
36
    AVRational        time_base;     ///< time_base to set in the output link
36 37
    AVRational        pixel_aspect;
37 38
} BufferSourceContext;
38 39

  
......
66 67
    char pix_fmt_str[128];
67 68
    int n = 0;
68 69

  
69
    if (!args || (n = sscanf(args, "%d:%d:%127s", &c->w, &c->h, pix_fmt_str)) != 3) {
70
        av_log(ctx, AV_LOG_ERROR, "Expected 3 arguments, but only %d found in '%s'\n", n, args ? args : "");
70
    if (!args ||
71
        (n = sscanf(args, "%d:%d:%127[^:]:%d:%d", &c->w, &c->h, pix_fmt_str, &c->time_base.num, &c->time_base.den)) != 5) {
72
        av_log(ctx, AV_LOG_ERROR, "Expected 5 arguments, but only %d found in '%s'\n", n, args);
71 73
        return AVERROR(EINVAL);
72 74
    }
73 75
    if ((c->pix_fmt = av_get_pix_fmt(pix_fmt_str)) == PIX_FMT_NONE) {
......
98 100

  
99 101
    link->w = c->w;
100 102
    link->h = c->h;
103
    link->time_base = c->time_base;
101 104

  
102 105
    return 0;
103 106
}

Also available in: Unified diff