mf: Fix some issues with seeking.
This fixes failure to play the prologue video in Planet of the Apes: Last Frontier, which unpauses by calling Start() with a location. The exact state leading to this issue does not occur in the Start() tests, and it's not clear how to reproduce it reliably.
Merge request reports
Activity
requested review from @nsivov
added 4 commits
Toggle commit listWe have session_flush_nodes() that flushes transforms and sinks, and it's called on SESSION_STATE_RESTARTING_SOURCES. These changes look to scattered to me to make sense, but it should also be possible to test manually in which order things happen, e.g. when, or if, we should flush relative to source restart for example.
I tested in Windows by swapping the vtbl in a sample copier transform, and in the media source. Windows sends
MFT_MESSAGE_COMMAND_FLUSH
after a seeking unpause (before callingStart()
on the source), but not after unpause at the current position, which is in line with our expectations. Wine sendsMFT_MESSAGE_NOTIFY_START_OF_STREAM
after every start, but Windows only sends it once, before callingStart()
. That would be a separate MR though. Windows also sendsMFT_MESSAGE_NOTIFY_BEGIN_STREAMING
, which is not necessary according to spec, but we might do that too in case something depends on it.I changed this MR to use
session_flush_nodes()
when unpausing with a seek. Flush messaging now matches that in Windows.
added 4 commits
Toggle commit listadded 4 commits
Toggle commit listadded 6 commits
- e3c92585 - mf: Reset transforms before restarting a paused source instead of after.
- 3000d8f0 - mf: Drop transform node input events when unpausing at a specific position.
- b2be976e - mf: Flush nodes before restarting a paused source at a specific position.
- f0e6329e - mf: Reset transform node outputs when seeking.
- d7e9650f - mf: Initialise the grabber sample count when setting state after a seek.
- 6375f1c8 - mf: Reset transform nodes when seeking.
Toggle commit list