summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;