commit 5a898881cd08155b14a6554e966a9a4d6938707b
parent 7fa3c4c55704e8130e302c85d189c114bdebaddc
Author: Alexander Kojevnikov <alexander@kojevnikov.com>
Date: Fri, 22 Feb 2013 18:56:33 -0800
Fix compilation with Libav 0.8.5 (Debian sid)
Diffstat:
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
@@ -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
diff --git a/src/spek-audio.cc b/src/spek-audio.cc
@@ -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;