aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/rtp_audio_stream.cpp
diff options
context:
space:
mode:
authorj.novak@netsystem.cz <j.novak@netsystem.cz>2022-10-08 09:30:52 +0000
committerA Wireshark GitLab Utility <6629907-ws-gitlab-utility@users.noreply.gitlab.com>2022-10-08 09:30:52 +0000
commit2c56c0bad696194d6a8b013ae3174eb08cd6be0c (patch)
treef29ac80bf681575e878fb159abf2bfd6ee54b5e4 /ui/qt/rtp_audio_stream.cpp
parenta1ec85089478ea88d68f10d4d68772307127845e (diff)
RTP Player: Fix: Only silence played on Windows with Qt 6.x
Diffstat (limited to 'ui/qt/rtp_audio_stream.cpp')
-rw-r--r--ui/qt/rtp_audio_stream.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/qt/rtp_audio_stream.cpp b/ui/qt/rtp_audio_stream.cpp
index 013162cefb..4229854c07 100644
--- a/ui/qt/rtp_audio_stream.cpp
+++ b/ui/qt/rtp_audio_stream.cpp
@@ -803,12 +803,17 @@ bool RtpAudioStream::prepareForPlay(QAudioDeviceInfo out_device)
void RtpAudioStream::startPlaying()
{
+ // On Win32/Qt 6.x start() returns, but state() is QAudio::StoppedState even
+ // everything is OK
audio_output_->start(temp_file_);
+#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
+ // Bug is related to Qt 4.x and probably for 5.x, but not for 6.x
// QTBUG-6548 StoppedState is not always emitted on error, force a cleanup
// in case playback fails immediately.
if (audio_output_ && audio_output_->state() == QAudio::StoppedState) {
outputStateChanged(QAudio::StoppedState);
}
+#endif
}
void RtpAudioStream::pausePlaying()