diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2009-03-06 17:24:59 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2009-03-06 17:24:59 +0000 |
| commit | a56b6aaeb604f4211b5cb0a3c3d07232ac180eae (patch) | |
| tree | e34d70d5865000339bec1bbf540ff20cecf74d54 /src/plugins/Input/ffmpeg/settingsdialog.cpp | |
| parent | 3e34c29f779c920bea0e7322aea18feb2f6dd527 (diff) | |
| download | qmmp-a56b6aaeb604f4211b5cb0a3c3d07232ac180eae.tar.gz qmmp-a56b6aaeb604f4211b5cb0a3c3d07232ac180eae.tar.bz2 qmmp-a56b6aaeb604f4211b5cb0a3c3d07232ac180eae.zip | |
fixed ffmpeg regression
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@824 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Input/ffmpeg/settingsdialog.cpp')
| -rw-r--r-- | src/plugins/Input/ffmpeg/settingsdialog.cpp | 33 |
1 files changed, 8 insertions, 25 deletions
diff --git a/src/plugins/Input/ffmpeg/settingsdialog.cpp b/src/plugins/Input/ffmpeg/settingsdialog.cpp index f9d439438..ffb4d1629 100644 --- a/src/plugins/Input/ffmpeg/settingsdialog.cpp +++ b/src/plugins/Input/ffmpeg/settingsdialog.cpp @@ -33,7 +33,6 @@ extern "C" #include <avformat.h> #endif - #if defined HAVE_FFMPEG_AVCODEC_H #include <ffmpeg/avcodec.h> #elif defined HAVE_LIBAVCODEC_AVCODEC_H @@ -42,28 +41,6 @@ extern "C" #include <avcodec.h> #endif -// FIXME: Check for available codecs... -#if ! defined CODEC_ID_WMAV1 -#define CODEC_ID_WMAV1 CODEC_ID_NONE -#endif -#if ! defined CODEC_ID_APE -#define CODEC_ID_APE CODEC_ID_NONE -#endif -#if ! defined CODEC_ID_TTA -#define CODEC_ID_TTA CODEC_ID_NONE -#endif -#if ! defined CODEC_ID_ALAC -#define CODEC_ID_ALAC CODEC_ID_NONE -#endif -#if ! defined CODEC_ID_AAC -#define CODEC_ID_AAC CODEC_ID_NONE -#endif -#if ! defined CODEC_ID_MP3 -#define CODEC_ID_MP3 CODEC_ID_NONE -#endif -#if ! defined CODEC_ID_RA_288 -#define CODEC_ID_RA_288 CODEC_ID_NONE -#endif } #include "settingsdialog.h" @@ -75,15 +52,22 @@ SettingsDialog::SettingsDialog(QWidget *parent) setAttribute(Qt::WA_DeleteOnClose); QSettings settings(Qmmp::configFile(), QSettings::IniFormat); QStringList filters; - filters << "*.wma" << "*.ape"; + filters << "*.wma"; +#if (LIBAVCODEC_VERSION_INT >= ((51<<16)+(44<<8)+0)) + filters << "*.ape"; +#endif filters = settings.value("FFMPEG/filters", filters).toStringList(); avcodec_init(); avcodec_register_all(); av_register_all(); ui.wmaCheckBox->setEnabled(avcodec_find_decoder(CODEC_ID_WMAV1)); ui.wmaCheckBox->setChecked(filters.contains("*.wma") && avcodec_find_decoder(CODEC_ID_WMAV1)); +#if (LIBAVCODEC_VERSION_INT >= ((51<<16)+(44<<8)+0)) ui.apeCheckBox->setEnabled(avcodec_find_decoder(CODEC_ID_APE)); ui.apeCheckBox->setChecked(filters.contains("*.ape") && avcodec_find_decoder(CODEC_ID_APE)); +#else + ui.apeCheckBox->setChecked(FALSE); +#endif ui.ttaCheckBox->setEnabled(avcodec_find_decoder(CODEC_ID_TTA)); ui.ttaCheckBox->setChecked(filters.contains("*.tta") && avcodec_find_decoder(CODEC_ID_TTA)); ui.alacCheckBox->setEnabled(avcodec_find_decoder(CODEC_ID_ALAC)); @@ -96,7 +80,6 @@ SettingsDialog::SettingsDialog(QWidget *parent) ui.mp4CheckBox->setChecked(filters.contains("*.m4a") && avcodec_find_decoder(CODEC_ID_AAC)); ui.raCheckBox->setEnabled(avcodec_find_decoder(CODEC_ID_RA_288)); ui.raCheckBox->setChecked(filters.contains("*.ra") && avcodec_find_decoder(CODEC_ID_RA_288)); - } |
