Control: tags -1 + patch On 2014-02-18 00:11:17, Moritz Muehlenhoff wrote: > /home/jmm/av10/qmmp-0.7.4/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp:229:23: > error: 'CODEC_ID_SHORTEN' was not declared in this scope > if(c->codec_id == CODEC_ID_SHORTEN) //ffmpeg bug workaround > ^ > /home/jmm/av10/qmmp-0.7.4/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp: In > member function 'qint64 DecoderFFmpeg::ffmpeg_decode()': > /home/jmm/av10/qmmp-0.7.4/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp:333:9: > warning: 'void avcodec_get_frame_defaults(AVFrame*)' is deprecated (declared > at /usr/include/libavcodec/avcodec.h:3120) [-Wdeprecated-declarations] > avcodec_get_frame_defaults(m_decoded_frame); > ^ > /home/jmm/av10/qmmp-0.7.4/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp:333:51: > warning: 'void avcodec_get_frame_defaults(AVFrame*)' is deprecated (declared > at /usr/include/libavcodec/avcodec.h:3120) [-Wdeprecated-declarations] > avcodec_get_frame_defaults(m_decoded_frame); > ^ > /home/jmm/av10/qmmp-0.7.4/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp: In > member function 'void DecoderFFmpeg::fillBuffer()': > /home/jmm/av10/qmmp-0.7.4/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp:391:45: > error: 'CODEC_ID_APE' was not declared in this scope > if(m_seekTime && c->codec_id == CODEC_ID_APE) > ^ > /home/jmm/av10/qmmp-0.7.4/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp:404:46: > error: 'CODEC_ID_APE' was not declared in this scope > if(m_skipBytes > 0 && c->codec_id == CODEC_ID_APE) > ^ > /home/jmm/av10/qmmp-0.7.4/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp:443:31: > error: 'CODEC_ID_SHORTEN' was not declared in this scope > if(c->codec_id == CODEC_ID_SHORTEN || c->codec_id == > CODEC_ID_TWINVQ) > ^ > /home/jmm/av10/qmmp-0.7.4/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp:443:66: > error: 'CODEC_ID_TWINVQ' was not declared in this > scope > if(c->codec_id == CODEC_ID_SHORTEN || c->codec_id == > CODEC_ID_TWINVQ) > ^ > /home/jmm/av10/qmmp-0.7.4/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp:454:31: > error: 'CODEC_ID_SHORTEN' was not declared in this scope > if(c->codec_id == CODEC_ID_SHORTEN || c->codec_id == > CODEC_ID_TWINVQ) > ^ > /home/jmm/av10/qmmp-0.7.4/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp:454:66: > error: 'CODEC_ID_TWINVQ' was not declared in this > scope > if(c->codec_id == CODEC_ID_SHORTEN || c->codec_id == > CODEC_ID_TWINVQ) > ^
The attached patch should be enough to fix this issue. Regards -- Sebastian Ramacher
--- qmmp-0.7.4.orig/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp
+++ qmmp-0.7.4/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp
@@ -22,6 +22,12 @@
#include <QFile>
#include "decoder_ffmpeg.h"
+#if LIBAVCODEC_VERSION_MAJOR >= 55
+#define CODEC_ID_APE AV_CODEC_ID_APE
+#define CODEC_ID_SHORTEN AV_CODEC_ID_SHORTEN
+#define CODEC_ID_TWINVQ AV_CODEC_ID_TWINVQ
+#endif
+
// callbacks
static int ffmpeg_read(void *data, uint8_t *buf, int size)
--- qmmp-0.7.4.orig/src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp
+++ qmmp-0.7.4/src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp
@@ -33,6 +33,20 @@
#include "decoder_ffmpeg.h"
#include "decoderffmpegfactory.h"
+#if LIBAVCODEC_VERSION_MAJOR >= 55
+#define CODEC_ID_AAC AV_CODEC_ID_AAC
+#define CODEC_ID_ALAC AV_CODEC_ID_ALAC
+#define CODEC_ID_APE AV_CODEC_ID_APE
+#define CODEC_ID_DTS AV_CODEC_ID_DTS
+#define CODEC_ID_EAC3 AV_CODEC_ID_EAC3
+#define CODEC_ID_MP3 AV_CODEC_ID_MP3
+#define CODEC_ID_RA_288 AV_CODEC_ID_RA_288
+#define CODEC_ID_SHORTEN AV_CODEC_ID_SHORTEN
+#define CODEC_ID_TRUEHD AV_CODEC_ID_TRUEHD
+#define CODEC_ID_TTA AV_CODEC_ID_TTA
+#define CODEC_ID_TWINVQ AV_CODEC_ID_TWINVQ
+#define CODEC_ID_WMAV1 AV_CODEC_ID_WMAV1
+#endif
// DecoderFFmpegFactory
--- qmmp-0.7.4.orig/src/plugins/Input/ffmpeg/settingsdialog.cpp
+++ qmmp-0.7.4/src/plugins/Input/ffmpeg/settingsdialog.cpp
@@ -29,6 +29,22 @@
}
#include "settingsdialog.h"
+#if LIBAVCODEC_VERSION_MAJOR >= 55
+#define CODEC_ID_AAC AV_CODEC_ID_AAC
+#define CODEC_ID_ALAC AV_CODEC_ID_ALAC
+#define CODEC_ID_APE AV_CODEC_ID_APE
+#define CODEC_ID_DTS AV_CODEC_ID_DTS
+#define CODEC_ID_EAC3 AV_CODEC_ID_EAC3
+#define CODEC_ID_MP3 AV_CODEC_ID_MP3
+#define CODEC_ID_RA_288 AV_CODEC_ID_RA_288
+#define CODEC_ID_SHORTEN AV_CODEC_ID_SHORTEN
+#define CODEC_ID_TRUEHD AV_CODEC_ID_TRUEHD
+#define CODEC_ID_TTA AV_CODEC_ID_TTA
+#define CODEC_ID_TWINVQ AV_CODEC_ID_TWINVQ
+#define CODEC_ID_WMAV1 AV_CODEC_ID_WMAV1
+#endif
+
+
SettingsDialog::SettingsDialog(QWidget *parent)
: QDialog(parent)
{
signature.asc
Description: Digital signature

