OSDN Git Service

Updated VS2008 projects/solution files.
[lamexp/LameXP.git] / src / Decoder_AAC.cpp
index f8fd3ad..8b91dac 100644 (file)
@@ -1,6 +1,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 // LameXP - Audio Encoder Front-End
-// Copyright (C) 2004-2011 LoRd_MuldeR <MuldeR2@GMX.de>
+// Copyright (C) 2004-2012 LoRd_MuldeR <MuldeR2@GMX.de>
 //
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -68,7 +68,7 @@ bool AACDecoder::decode(const QString &sourceFile, const QString &outputFile, vo
                        emit messageLogged("\nABORTED BY USER !!!");
                        break;
                }
-               process.waitForReadyRead();
+               process.waitForReadyRead(m_processTimeoutInterval);
                if(!process.bytesAvailable() && process.state() == QProcess::Running)
                {
                        process.kill();
@@ -104,7 +104,7 @@ bool AACDecoder::decode(const QString &sourceFile, const QString &outputFile, vo
        emit statusUpdated(100);
        emit messageLogged(QString().sprintf("\nExited with code: 0x%04X", process.exitCode()));
 
-       if(bTimeout || bAborted || process.exitStatus() != QProcess::NormalExit || QFileInfo(outputFile).size() == 0)
+       if(bTimeout || bAborted || process.exitCode() != EXIT_SUCCESS || QFileInfo(outputFile).size() == 0)
        {
                return false;
        }