diff options
author | Val Doroshchuk <valentyn.doroshchuk@qt.io> | 2018-01-08 16:23:21 +0100 |
---|---|---|
committer | VaL Doroshchuk <valentyn.doroshchuk@qt.io> | 2018-03-22 11:00:30 +0000 |
commit | 1d95eee694553feb30f415a1b3eee94caad53fb0 (patch) | |
tree | d56df52fce10894ed5e0f471e9037db89855d52f /src/plugins/directshow | |
parent | efbb769b24e1a3b88326578042029876b09b4dea (diff) | |
download | qtmultimedia-1d95eee694553feb30f415a1b3eee94caad53fb0.tar.gz |
DirectShow: Add warning when not supported playback rate applied
IMediaSeeking::SetRate() may return an error when not supported rate is
being applied.
Added a warning to inform user about incorrect rate value
also fixed a bug when the rate has been always fell back to 1.0
instead of previous value.
Task-number: QTBUG-55354
Change-Id: I85fb5572cba6920b461a023aef1bc09a981ab033
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
Diffstat (limited to 'src/plugins/directshow')
-rw-r--r-- | src/plugins/directshow/player/directshowplayerservice.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/directshow/player/directshowplayerservice.cpp b/src/plugins/directshow/player/directshowplayerservice.cpp index 8ee5d67a1..63f738bbe 100644 --- a/src/plugins/directshow/player/directshowplayerservice.cpp +++ b/src/plugins/directshow/player/directshowplayerservice.cpp @@ -1071,8 +1071,11 @@ void DirectShowPlayerService::doSetRate(QMutexLocker *locker) locker->relock(); if (!SUCCEEDED(hr)) { + qWarning("%s: Audio device or filter does not support rate: %.2f. " \ + "Falling back to previous value.", __FUNCTION__, m_rate); + double rate = 0.0; - m_rate = seeking->GetRate(&rate) + m_rate = SUCCEEDED(seeking->GetRate(&rate)) ? rate : 1.0; } |