Priority: P2: Important
Affects Version/s: 6.2.0
Commits:9285ad4a87c47d2744124f14aebe710e1ee55517 (qt/qtmultimedia/dev) ade14c3b2db9fe5e03e12c3052f0c6ead77b1481 (qt/qtmultimedia/6.2)
As per attached code, using QMediaPlayer and (in my case) QVideoWidget:
- Start app and video autoplays
- Pause at e.g. 3s
EXPECTED: Video plays from setPosition location i.e. 0.5s
ACTUAL: Video plays from pause position i.e. 3s - visually it jerks forward.
Further Details from MFPlayerSession.cpp
When a IMFMediaSession pause() completes, the callback MFPlayerSession::handleSessionEvent caches the current WMF clock time as m_position:
Clearly, this would allow a consecutive start() to resume at m_position which makes sense.
If instead, setPosition() is called after pause(), a slightly different situation arises. setPositionInternal() calls setScrub(true) which correctly sets the frame rate to 0 and flags a scrub as taking place (m_scrubbing=true).
However, when start() is called the following happens (elided):
Thus start() always resumes from the cached m_position.
Perhaps, after turning off scrubbing state, start() could somehow adjust the cached m_position to the seek location:
Then it would resume playback from wherever the seek ended.