diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2014-04-13 16:02:16 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2014-04-13 16:02:16 +0000 |
| commit | 5765bd5525edb2b4d0f510573201580cc9d4ffd2 (patch) | |
| tree | 46cb60a36a7f8ccf7869e99861c53d538f1abfda /src/plugins/Engines/mplayer/mplayerengine.cpp | |
| parent | b5867c98bb1128d9f95df89e1e76078c45fdebe2 (diff) | |
| download | qmmp-5765bd5525edb2b4d0f510573201580cc9d4ffd2.tar.gz qmmp-5765bd5525edb2b4d0f510573201580cc9d4ffd2.tar.bz2 qmmp-5765bd5525edb2b4d0f510573201580cc9d4ffd2.zip | |
fixed possible freezes in the mplayer plugin
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@4249 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Engines/mplayer/mplayerengine.cpp')
| -rw-r--r-- | src/plugins/Engines/mplayer/mplayerengine.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/Engines/mplayer/mplayerengine.cpp b/src/plugins/Engines/mplayer/mplayerengine.cpp index 217db97de..7b8a14810 100644 --- a/src/plugins/Engines/mplayer/mplayerengine.cpp +++ b/src/plugins/Engines/mplayer/mplayerengine.cpp @@ -56,6 +56,7 @@ FileInfo *MplayerInfo::createFileInfo(const QString &path) QProcess mplayer_process; mplayer_process.start("mplayer", args); mplayer_process.waitForFinished(1500); + mplayer_process.kill(); QString str = QString::fromLocal8Bit(mplayer_process.readAll()).trimmed(); FileInfo *info = new FileInfo(path); QStringList lines = str.split("\n"); @@ -174,6 +175,7 @@ void MplayerEngine::stop() m_user_stop = true; m_process->write("quit\n"); m_process->waitForFinished(3500); + m_process->kill(); } StateHandler::instance()->dispatch(Qmmp::Stopped); } @@ -231,7 +233,10 @@ void MplayerEngine::readStdOut() else if (rx_quit.indexIn(line) > -1 && !m_user_stop) { if (m_process->state() == QProcess::Running) + { m_process->waitForFinished(1500); + m_process->kill(); + } StateHandler::instance()->dispatch(Qmmp::Stopped); } else if (rx_audio.indexIn(line) > -1) |
