0

我有一个结构AVFilter

AVFilter avfilter_vsrc_color = {  
    .name            = "color",  // error here
    .description     = NULL_IF_CONFIG_SMALL("Provide an uniformly colored input."),  
    .priv_class      = &color_class,  
    .priv_size       = sizeof(TestSourceContext),  
    .init            = color_init,  
    .uninit          = uninit,  
    .query_formats   = color_query_formats,  
    .inputs          = NULL,  
    .outputs         = color_outputs,  
    .process_command = color_process_command,  
};

和 AVFilter 定义为,

typedef struct AVFilter {

    const char *name;
    const char *description;
    const AVFilterPad *inputs;
    const AVFilterPad *outputs;
    const AVClass *priv_class;
    int flags;
    int (*init)(AVFilterContext *ctx);
    int (*init_dict)(AVFilterContext *ctx, AVDictionary **options);
    void (*uninit)(AVFilterContext *ctx);
    int (*query_formats)(AVFilterContext *);
    int priv_size;      ///< size of private data to allocate for the filter
    struct AVFilter *next;
    int (*process_command)(AVFilterContext *, const char *cmd, const char *arg, char *res, int res_len, int flags);
    int (*init_opaque)(AVFilterContext *ctx, void *opaque);

} AVFilter;

我收到错误,例如

2>c:\users\awki6\desktop\ffmpeg\libavfilter\vsrc_testsrc.cpp(268): error C2143: syntax error : missing '}' before '.'  
2>c:\users\awki6\desktop\ffmpeg\libavfilter\vsrc_testsrc.cpp(268): error C2143: syntax error : missing ';' before '.'  
2>c:\users\awki6\desktop\ffmpeg\libavfilter\vsrc_testsrc.cpp(268): error C2059: syntax error : '.'
4

1 回答 1

0

请告诉我们哪一行是268!

请尝试删除逗号

.process_command = color_process_command,

并尝试再次编译它。如果您能提供更多详细信息,例如哪条线路是 268,则可以找到原因!

于 2013-10-24T10:56:21.677 回答