0

I have an structure 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,  
};

and AVFilter is defined as,

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;

I m getting error like ,

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 : '.'
JAYANTHI
  • 1
  • 3
  • Care to tell us which line is 268? Perhaps mark it in the question source code ? I'm just guessing its `.name = "color"`. – WhozCraig Oct 24 '13 at 10:42

1 Answers1

0

Please let us know which line is 268!

Please try removing the comma for

.process_command = color_process_command,

and try compiling it again. if you can give us more details like which line is 268 it will be possible to find the reason!

Basavaraju B V
  • 174
  • 1
  • 8
  • .name = "color", // line no 268 – JAYANTHI Oct 24 '13 at 10:59
  • Did you try removing the comma at this line .process_command = color_process_command, ?? You can check the similar question [here](http://stackoverflow.com/questions/330793/how-to-initialize-a-struct-in-ansi-c/330834#330834) and for the last entry there is no comma. – Basavaraju B V Oct 24 '13 at 11:23
  • Yes, i tried by removing comma at this line .process_command = color_process_command and i complied..getting same error on line no 268 .name = "color" – JAYANTHI Oct 24 '13 at 11:30
  • I am sorry, could you please check the line before definition of the structure variable 'AVFilter avfilter_vsrc_color' !? may be a semicolon or or brace is missing!. because I tried the same here and it is not giving me any error. – Basavaraju B V Oct 24 '13 at 12:41