Before this, stopping and restarting the media session could cause MFT streams to get stuck in the "already pending" state, which would lead to no more samples getting delivered.
This also reverts 18c0dd7390b354d2e505e54cd3f3f9b08226b265, my previous attempt to fix the problem which for some reason seemed to help - but with the new fix, it does not make any difference.
The reverted commit is faulty since the Flush() method - which is called at session Stop, but runs after sample_grabber_set_state - already releases pending items, while processing markers immediately.
Sorry for the trouble.