diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2013-02-12 11:47:44 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2013-02-12 11:47:44 +0000 |
| commit | 1dd7b251792b8c80c67bacb9df8cb43c94d0b808 (patch) | |
| tree | 96ad5aac8c11fdd313ef06a1cbb2e0923976a9d3 /src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp | |
| parent | 77a9057b84b401d1ba62f46f02a5e10109d47f7b (diff) | |
| download | qmmp-1dd7b251792b8c80c67bacb9df8cb43c94d0b808.tar.gz qmmp-1dd7b251792b8c80c67bacb9df8cb43c94d0b808.tar.bz2 qmmp-1dd7b251792b8c80c67bacb9df8cb43c94d0b808.zip | |
ffmpeg plugin: cleanup
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@3232 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp')
| -rw-r--r-- | src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp b/src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp index 02588a92c..b8ffae9fe 100644 --- a/src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp +++ b/src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp @@ -35,6 +35,13 @@ extern "C"{ // DecoderFFmpegFactory +DecoderFFmpegFactory::DecoderFFmpegFactory() +{ + avcodec_register_all(); + avformat_network_init(); + av_register_all(); +} + bool DecoderFFmpegFactory::supports(const QString &source) const { foreach(QString filter, properties().filters) @@ -48,7 +55,6 @@ bool DecoderFFmpegFactory::supports(const QString &source) const bool DecoderFFmpegFactory::canDecode(QIODevice *i) const { - av_register_all(); QStringList filters = properties().filters; AVProbeData pd; @@ -83,7 +89,6 @@ bool DecoderFFmpegFactory::canDecode(QIODevice *i) const const DecoderProperties DecoderFFmpegFactory::properties() const { - av_register_all(); QSettings settings(Qmmp::configFile(), QSettings::IniFormat); QStringList filters; filters << "*.wma" << "*.ape"; @@ -134,9 +139,6 @@ Decoder *DecoderFFmpegFactory::create(const QString &path, QIODevice *input) QList<FileInfo *> DecoderFFmpegFactory::createPlayList(const QString &fileName, bool useMetaData) { QList <FileInfo*> list; - avcodec_register_all(); - avformat_network_init(); - av_register_all(); AVFormatContext *in = 0; if (avformat_open_input(&in,fileName.toLocal8Bit().constData(), 0, 0) < 0) |
