diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2016-04-26 18:11:03 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2016-04-26 18:11:03 +0000 |
| commit | 3f525068c53c3c7d505a3aaec1d209c9cf1101b9 (patch) | |
| tree | 74d0da3f7cf10c41ab096ea2c8abeea19d522536 | |
| parent | fff8e1140143b472b892d0379bcb4cfda7dd7d60 (diff) | |
| download | qmmp-3f525068c53c3c7d505a3aaec1d209c9cf1101b9.tar.gz qmmp-3f525068c53c3c7d505a3aaec1d209c9cf1101b9.tar.bz2 qmmp-3f525068c53c3c7d505a3aaec1d209c9cf1101b9.zip | |
ffmpeg: fixed utf-8 support under windows
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@6270 90c681e8-e032-0410-971d-27865f9a5e38
| -rw-r--r-- | src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp | 6 | ||||
| -rw-r--r-- | src/plugins/Input/ffmpeg/ffmpegmetadatamodel.cpp | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp b/src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp index b836a5d92..feed3bd48 100644 --- a/src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp +++ b/src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2015 by Ilya Kotov * + * Copyright (C) 2008-2016 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -190,7 +190,11 @@ QList<FileInfo *> DecoderFFmpegFactory::createPlayList(const QString &fileName, QList <FileInfo*> list; AVFormatContext *in = 0; +#ifdef Q_OS_WIN + if (avformat_open_input(&in,fileName.toUtf8().constData(), 0, 0) < 0) +#else if (avformat_open_input(&in,fileName.toLocal8Bit().constData(), 0, 0) < 0) +#endif { qDebug("DecoderFFmpegFactory: unable to open file"); return list; diff --git a/src/plugins/Input/ffmpeg/ffmpegmetadatamodel.cpp b/src/plugins/Input/ffmpeg/ffmpegmetadatamodel.cpp index d069ca371..449e55052 100644 --- a/src/plugins/Input/ffmpeg/ffmpegmetadatamodel.cpp +++ b/src/plugins/Input/ffmpeg/ffmpegmetadatamodel.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2009-2015 by Ilya Kotov * + * Copyright (C) 2009-2016 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -24,7 +24,11 @@ FFmpegMetaDataModel::FFmpegMetaDataModel(const QString &path, QObject *parent) : MetaDataModel(parent) { m_in = 0; +#ifdef Q_OS_WIN + if (avformat_open_input(&m_in, path.toUtf8().constData(), 0, 0) < 0) +#else if (avformat_open_input(&m_in, path.toLocal8Bit().constData(), 0, 0) < 0) +#endif return; avformat_find_stream_info(m_in, 0); av_read_play(m_in); |
