#if LIBAVCODEC_VERSION_MAJOR < 53
#define AVPALETTE_SIZE 1024
#define AVPALETTE_COUNT 256
typedef struct AVPaletteControl {
 
    int palette_changed;
 
    unsigned int palette[AVPALETTE_COUNT];

} AVPaletteControl attribute_deprecated;
#endif
以上是定义结构体attribute_deprecated void av_destruct_packet_nofree(AVPacket *pkt);//此处为使用结构体来定义函数
void av_destruct_packet(AVPacket *pkt);                          //   ---ln1166
以下是出现的错误:e:\测试实验台\vc6.0\testffmpegformp4\ffmpeg\libavcodec\avcodec.h(1165) : error C2085: 'av_destruct_packet_nofree' : not in formal parameter list
e:\测试实验台\vc6.0\testffmpegformp4\ffmpeg\libavcodec\avcodec.h(1166) : error C2085: 'av_destruct_packet' : not in formal parameter list
请问一下这个是什么错误,我定义过了,不明白为什么,请各位高手看看!

解决方案 »

  1.   

    #if LIBAVCODEC_VERSION_MAJOR < 53
    #define AVPALETTE_SIZE 1024
    #define AVPALETTE_COUNT 256
    typedef struct AVPaletteControl { int palette_changed; unsigned int palette[AVPALETTE_COUNT];} attribute_deprecated;
    #endifattribute_deprecated av_destruct_packet_nofree(AVPacket *pkt);//此处为使用结构体来定义函数
    void av_destruct_packet(AVPacket *pkt);
      

  2.   

    attribute_deprecated void av_destruct_packet_nofree(AVPacket *pkt);//此处为使用结构体来定义函数????
    “attribute_deprecated void ”
    怎么返回类型写了2个啊?
      

  3.   


    呵呵,是啊,ffmpeg就是这样子,看来我被愚弄了,呵呵,非常感谢大家!