summaryrefslogtreecommitdiffstats
path: root/src/plugins/wmf/decoder
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@theqtcompany.com>2015-04-16 11:30:08 +0200
committerYoann Lopes <yoann.lopes@theqtcompany.com>2015-05-19 11:41:42 +0000
commitb0111ce5f59d813e01a5e6d3e22189343579ebbf (patch)
treebc15701f0866c17f9c1e86d6c77310c2b3fd5123 /src/plugins/wmf/decoder
parentaaff15aec613fa2e2717a8d7b96e25e319a1fbc7 (diff)
WMF: fix start time of buffers provided by QAudioDecoder.
The time was in milliseconds but should be in microseconds. Task-number: QTBUG-45571 Change-Id: I54f07975e7a6233254a338dcde8075f740b5455c Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
Diffstat (limited to 'src/plugins/wmf/decoder')
-rw-r--r--src/plugins/wmf/decoder/mfaudiodecodercontrol.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/wmf/decoder/mfaudiodecodercontrol.cpp b/src/plugins/wmf/decoder/mfaudiodecodercontrol.cpp
index e3d1ebde1..55fae7146 100644
--- a/src/plugins/wmf/decoder/mfaudiodecodercontrol.cpp
+++ b/src/plugins/wmf/decoder/mfaudiodecodercontrol.cpp
@@ -389,7 +389,8 @@ void MFAudioDecoderControl::handleSampleAdded()
s->Release();
}
}
- m_cachedAudioBuffer = QAudioBuffer(abuf, m_audioFormat, qint64(sampleStartTime / 10000));
+ // WMF uses 100-nanosecond units, QAudioDecoder uses milliseconds, QAudioBuffer uses microseconds...
+ m_cachedAudioBuffer = QAudioBuffer(abuf, m_audioFormat, qint64(sampleStartTime / 10));
m_bufferReady = true;
emit positionChanged(m_position);
emit bufferAvailableChanged(m_bufferReady);