performous / composer

Song editor for Performous and other singing games
Other
40 stars 23 forks source link

Redefines AVCODEC_MAX_AUDIO_FRAME_SIZE which is depricated #20

Closed norpol closed 10 years ago

norpol commented 10 years ago

Solves the following issue while building: Source

[ 97%] [100%] Building CXX object src/CMakeFiles/composer.dir/moc_synth.cpp.o
Building CXX object src/CMakeFiles/composer.dir/qrc_editor.cpp.o
/home/tom/Static/Software/composer/src/ffmpeg.cc: In member function ‘void FFmpeg::decodeNextFrame()’:
/home/tom/Static/Software/composer/src/ffmpeg.cc:146:51: error: ‘AVCODEC_MAX_AUDIO_FRAME_SIZE’ was not declared in this scope
  std::vector<char, AvMalloc<char> > decodedBuffer(AVCODEC_MAX_AUDIO_FRAME_SIZE);
                                                   ^
/home/tom/Static/Software/composer/src/ffmpeg.cc:156:25: warning: ‘AVFrame* avcodec_alloc_frame()’ is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:3231) [-Wdeprecated-declarations]
      AVFrame* m_frame = avcodec_alloc_frame();
                         ^
/home/tom/Static/Software/composer/src/ffmpeg.cc:156:45: warning: ‘AVFrame* avcodec_alloc_frame()’ is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:3231) [-Wdeprecated-declarations]
      AVFrame* m_frame = avcodec_alloc_frame();
                                             ^
make[2]: *** [src/CMakeFiles/composer.dir/ffmpeg.cc.o] Error 1
make[1]: *** [src/CMakeFiles/composer.dir/all] Error 2
make: *** [all] Error 2
norpol commented 10 years ago

FYI: Build will fail on older ffmpeg versions, you need to wrap it into an if-else. Not skilled to do this.