在VS2012上编译ffmpeg遇到错误:
AVInputFormat ff_yop_demuxer = {
.name = "yop", // error on dot operater
.long_name = NULL_IF_CONFIG_SMALL("Psygnosis YOP"),
.priv_data_size = sizeof(YopDecContext),
.read_probe = yop_probe,
.read_header = yop_read_header,
.read_packet = yop_read_packet,
.read_close = yop_read_close,
.read_seek = yop_read_seek,
.extensions = "yop",
.flags = AVFMT_GENERIC_INDEX,
};
对结构体中的成员 进行指定初始化,例如: .name = "yop", 在VS2010 、VS2012 上不支持,VS2013才支持
编译时报错,就是下图中 红色的地方
https://social.msdn.microsoft.com/Forums/vstudio/en-US/66a83f44-11d7-4630-9c52-b47db0fe9f66/syntax-error-ffmpeg-source-code-running-on-vs2012?forum=vcgeneral
http://www.drdobbs.com/the-new-c-declarations-initializations/184401377
http://www.cnblogs.com/shadow21/p/4076986.html
http://stackoverflow.com/questions/23986521/c2059-in-vs2012-how-to-initialize-struct-instance
http://blog.csdn.net/adaptiver/article/details/7494081
http://blog.csdn.net/chgaowei/article/details/8629819