mirror of
https://github.com/alexkay/spek.git
synced 2025-06-15 23:02:27 +03:00
Fix compilation with libav 0.8.6
This commit is contained in:
parent
5eab9ea6f8
commit
45dfa998fd
@ -26,6 +26,17 @@ extern "C" {
|
|||||||
|
|
||||||
#include "spek-audio.h"
|
#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
|
class AudioFileImpl : public AudioFile
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -210,12 +221,7 @@ AudioFileImpl::~AudioFileImpl()
|
|||||||
av_freep(&this->buffer);
|
av_freep(&this->buffer);
|
||||||
}
|
}
|
||||||
if (this->frame) {
|
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);
|
avcodec_free_frame(&this->frame);
|
||||||
#else
|
|
||||||
av_freep(&this->frame);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
if (this->packet.data) {
|
if (this->packet.data) {
|
||||||
this->packet.data -= this->offset;
|
this->packet.data -= this->offset;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user