diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2011-05-10 16:05:14 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2011-05-10 16:05:14 +0000 |
| commit | a82a8cd70310fd5a104e1a3df6c6ae7459565330 (patch) | |
| tree | e6fe2e8088487f2bb0bac2137979a4b299008be8 /src | |
| parent | 56606b78c4fd9e2f09ca931d4b26eb7da932e341 (diff) | |
| download | qmmp-a82a8cd70310fd5a104e1a3df6c6ae7459565330.tar.gz qmmp-a82a8cd70310fd5a104e1a3df6c6ae7459565330.tar.bz2 qmmp-a82a8cd70310fd5a104e1a3df6c6ae7459565330.zip | |
fixed recent ffmpeg support
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@2183 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src')
| -rw-r--r-- | src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp | 9 | ||||
| -rw-r--r-- | src/plugins/Input/ffmpeg/ffmpegmetadatamodel.cpp | 7 |
2 files changed, 13 insertions, 3 deletions
diff --git a/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp b/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp index 902f6c9d8..d243e2ba3 100644 --- a/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp +++ b/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp @@ -155,14 +155,19 @@ bool DecoderFFmpeg::initialize() for (wma_idx = 0; wma_idx < (int)ic->nb_streams; wma_idx++) { c = ic->streams[wma_idx]->codec; - if (c->codec_type == CODEC_TYPE_AUDIO) break; +#if LIBAVCODEC_VERSION_MAJOR < 53 + if (c->codec_type == CODEC_TYPE_AUDIO) +#else + if (c->codec_type == AVMEDIA_TYPE_AUDIO) +#endif + break; } if (c->channels > 0) c->request_channels = qMin(2, c->channels); else c->request_channels = 2; - + #if (LIBAVCODEC_VERSION_INT >= ((52<<16)+(101<<8)+0)) av_dump_format(ic,0,0,0); #else diff --git a/src/plugins/Input/ffmpeg/ffmpegmetadatamodel.cpp b/src/plugins/Input/ffmpeg/ffmpegmetadatamodel.cpp index 933c766b6..cbabfe1f1 100644 --- a/src/plugins/Input/ffmpeg/ffmpegmetadatamodel.cpp +++ b/src/plugins/Input/ffmpeg/ffmpegmetadatamodel.cpp @@ -54,7 +54,12 @@ QHash<QString, QString> FFmpegMetaDataModel::audioProperties() for (wma_idx = 0; wma_idx < m_in->nb_streams; wma_idx++) { c = m_in->streams[wma_idx]->codec; - if (c->codec_type == CODEC_TYPE_AUDIO) break; +#if LIBAVCODEC_VERSION_MAJOR < 53 + if (c->codec_type == CODEC_TYPE_AUDIO) +#else + if (c->codec_type == AVMEDIA_TYPE_AUDIO) +#endif + break; } if (c) { |
