Fix compilation with Libav 0.8.5 (Debian sid)

This commit is contained in:
Alexander Kojevnikov 2013-02-22 18:56:33 -08:00
parent 7fa3c4c557
commit 5a898881cd
2 changed files with 6 additions and 1 deletions

View File

@ -35,7 +35,7 @@ AM_CONDITIONAL([USE_VALGRIND], [test x$HAVE_VALGRIND = xyes])
AC_CHECK_LIB(m, log10)
PKG_CHECK_MODULES(FFMPEG, [libavformat >= 54.2 libavcodec >= 53.25 libavutil >= 51.18])
PKG_CHECK_MODULES(FFMPEG, [libavcodec >= 53.25 libavformat >= 53.17 libavutil >= 51.17])
AM_OPTIONS_WXCONFIG
reqwx=2.8.0

View File

@ -213,7 +213,12 @@ 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;