spek

Acoustic spectrum analyser
git clone http://git.hanabi.in/repos/spek.git
Log | Files | Refs | README

commit 45dfa998fd78ea953bf172d50ed386a4f10804f9
parent 5eab9ea6f858fd87104d949b322af664bf50df28
Author: Alexander Kojevnikov <alexander@kojevnikov.com>
Date:   Fri, 12 Apr 2013 10:42:28 -0700

Fix compilation with libav 0.8.6

Diffstat:
Msrc/spek-audio.cc | 16+++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/spek-audio.cc b/src/spek-audio.cc @@ -26,6 +26,17 @@ extern "C" { #include "spek-audio.h" +// TODO: Remove these macros after Debian switches to libav 9. +#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 28, 0) +#define avcodec_free_frame av_freep +#endif +#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 25, 0) +#define AV_CODEC_ID_AAC CODEC_ID_AAC +#define AV_CODEC_ID_MUSEPACK8 CODEC_ID_MUSEPACK8 +#define AV_CODEC_ID_WMAV1 CODEC_ID_WMAV1 +#define AV_CODEC_ID_WMAV2 CODEC_ID_WMAV2 +#endif + class AudioFileImpl : public AudioFile { public: @@ -210,12 +221,7 @@ AudioFileImpl::~AudioFileImpl() av_freep(&this->buffer); } if (this->frame) { - // TODO: Remove this check after Debian switches to libav 9. -#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54, 28, 0) avcodec_free_frame(&this->frame); -#else - av_freep(&this->frame); -#endif } if (this->packet.data) { this->packet.data -= this->offset;