diff options
author | Lars Knoll <lars.knoll@qt.io> | 2021-01-07 13:40:45 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2021-01-22 07:01:23 +0000 |
commit | 1397286ab5845d1754da5a07ed2be71476940cd8 (patch) | |
tree | 1adfa511ead040553ba089afee5c9a9d95cc77a1 /src/plugins/wmf | |
parent | 7b616ac0c4b3a3564eef87bd05524a4be7ea2842 (diff) |
audio/pcm is not a valid mimetype
Use audio/x-raw instead, in line with gstreamer.
Change-Id: Ib6c27fec7e227d1086750b24f91b4b69ecc870a9
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/plugins/wmf')
-rw-r--r-- | src/plugins/wmf/decoder/mfaudiodecodercontrol.cpp | 4 | ||||
-rw-r--r-- | src/plugins/wmf/player/mfplayersession.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/wmf/decoder/mfaudiodecodercontrol.cpp b/src/plugins/wmf/decoder/mfaudiodecodercontrol.cpp index c0eada324..fcc1743bc 100644 --- a/src/plugins/wmf/decoder/mfaudiodecodercontrol.cpp +++ b/src/plugins/wmf/decoder/mfaudiodecodercontrol.cpp @@ -70,7 +70,7 @@ MFAudioDecoderControl::MFAudioDecoderControl(QObject *parent) connect(m_decoderSourceReader, SIGNAL(finished()), this, SLOT(handleSourceFinished())); QAudioFormat defaultFormat; - defaultFormat.setCodec("audio/pcm"); + defaultFormat.setCodec("audio/x-raw"); setAudioFormat(defaultFormat); } @@ -416,7 +416,7 @@ void MFAudioDecoderControl::setAudioFormat(const QAudioFormat &format) { if (m_audioFormat == format || !m_resampler) return; - if (format.codec() != QLatin1String("audio/x-wav") && format.codec() != QLatin1String("audio/pcm")) { + if (format.codec() != QLatin1String("audio/x-wav") && format.codec() != QLatin1String("audio/x-raw")) { qWarning("MFAudioDecoderControl does not accept non-pcm audio format!"); return; } diff --git a/src/plugins/wmf/player/mfplayersession.cpp b/src/plugins/wmf/player/mfplayersession.cpp index 1d145edc4..5da301479 100644 --- a/src/plugins/wmf/player/mfplayersession.cpp +++ b/src/plugins/wmf/player/mfplayersession.cpp @@ -571,7 +571,7 @@ QAudioFormat MFPlayerSession::audioFormatForMFMediaType(IMFMediaType *mediaType) format.setSampleRate(wfx->nSamplesPerSec); format.setChannelCount(wfx->nChannels); format.setSampleSize(wfx->wBitsPerSample); - format.setCodec("audio/pcm"); + format.setCodec("audio/x-raw"); format.setByteOrder(QAudioFormat::LittleEndian); if (format.sampleSize() == 8) format.setSampleType(QAudioFormat::UnSignedInt); |