diff options
author | Andrew den Exter <andrew.den-exter@nokia.com> | 2010-02-11 03:30:00 (GMT) |
---|---|---|
committer | Andrew den Exter <andrew.den-exter@nokia.com> | 2010-02-11 03:30:00 (GMT) |
commit | dc7a0b2842a5866b6248e56d41db0af05f7efbc2 (patch) | |
tree | 183b8e7c9935ab809d9dd4b7117c685c5a94feaa /src/plugins/mediaservices | |
parent | b2b80a93cd5ec39ce5bdcf5836e2b07ccb65389b (diff) | |
download | Qt-dc7a0b2842a5866b6248e56d41db0af05f7efbc2.zip Qt-dc7a0b2842a5866b6248e56d41db0af05f7efbc2.tar.gz Qt-dc7a0b2842a5866b6248e56d41db0af05f7efbc2.tar.bz2 |
Fix incorrect buffer size calculation.
Was off by one resulting in repeated playback of mp3s being cutt off.
Diffstat (limited to 'src/plugins/mediaservices')
-rw-r--r-- | src/plugins/mediaservices/directshow/mediaplayer/directshowioreader.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowioreader.cpp b/src/plugins/mediaservices/directshow/mediaplayer/directshowioreader.cpp index dcb9a40..54446b8 100644 --- a/src/plugins/mediaservices/directshow/mediaplayer/directshowioreader.cpp +++ b/src/plugins/mediaservices/directshow/mediaplayer/directshowioreader.cpp @@ -179,7 +179,7 @@ HRESULT DirectShowIOReader::Request(IMediaSample *pSample, DWORD_PTR dwUser) return VFW_E_SAMPLE_TIME_NOT_SET; } else { LONGLONG position = startTime / 10000000; - LONG length = ((endTime - startTime) / 10000000) + 1; + LONG length = (endTime - startTime) / 10000000; DirectShowSampleRequest *request = new DirectShowSampleRequest( pSample, dwUser, position, length, buffer); @@ -251,7 +251,7 @@ HRESULT DirectShowIOReader::SyncReadAligned(IMediaSample *pSample) return VFW_E_SAMPLE_TIME_NOT_SET; } else { LONGLONG position = startTime / 10000000; - LONG length = ((endTime - startTime) / 10000000) + 1; + LONG length = (endTime - startTime) / 10000000; QMutexLocker locker(&m_mutex); |