summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin McPherson <justin.mcpherson@nokia.com>2010-03-15 05:20:50 (GMT)
committerJustin McPherson <justin.mcpherson@nokia.com>2010-03-16 03:46:15 (GMT)
commit3f41524598f5b4795f0f6b279450daf792df927d (patch)
tree0126fbac6412aacf9b373ad9f9db0c8edc0ec607
parentdcae386d0387ebb28e6a15659844c4207ad50a63 (diff)
downloadQt-3f41524598f5b4795f0f6b279450daf792df927d.zip
Qt-3f41524598f5b4795f0f6b279450daf792df927d.tar.gz
Qt-3f41524598f5b4795f0f6b279450daf792df927d.tar.bz2
Make sure to check for a valid audioformat before open.
Reviewed-by:Dmytro Poplavskiy
-rw-r--r--src/multimedia/audio/qaudioinput_mac_p.cpp2
-rw-r--r--src/multimedia/audio/qaudiooutput_mac_p.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/multimedia/audio/qaudioinput_mac_p.cpp b/src/multimedia/audio/qaudioinput_mac_p.cpp
index f394ca4..7ab8c27 100644
--- a/src/multimedia/audio/qaudioinput_mac_p.cpp
+++ b/src/multimedia/audio/qaudioinput_mac_p.cpp
@@ -710,7 +710,7 @@ QIODevice* QAudioInputPrivate::start(QIODevice* device)
{
QIODevice* op = device;
- if (!open()) {
+ if (!audioFormat.isValid() || !open()) {
stateCode = QAudio::StoppedState;
errorCode = QAudio::OpenError;
return audioIO;
diff --git a/src/multimedia/audio/qaudiooutput_mac_p.cpp b/src/multimedia/audio/qaudiooutput_mac_p.cpp
index 6f32257..b457fed 100644
--- a/src/multimedia/audio/qaudiooutput_mac_p.cpp
+++ b/src/multimedia/audio/qaudiooutput_mac_p.cpp
@@ -435,7 +435,7 @@ QIODevice* QAudioOutputPrivate::start(QIODevice* device)
{
QIODevice* op = device;
- if (!open()) {
+ if (!audioFormat.isValid() || !open()) {
stateCode = QAudio::StoppedState;
errorCode = QAudio::OpenError;
return audioIO;