Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
[VideoPlayer] Ensure video queue is not in intermediate state when flushing #15716
If VPV receives a Flush() command from VP thread, it is possible that VPV thread has a video packet in process which will be stacked back (decoder resetted / not ready to receive input data after reset)
VP and VPV thread are not synchronized regarding completeness of the msgqueue, and especially after seek the packet with the old PTS value leads to long pause until VP has synced audio and video again.
This PR ensures that all packets are in VPV messagequeue and will be flushed by the VPV::FlushMessages call.
Kodi log snippet:
Motivation and Context
Often stalls when seeking Video streams
How Has This Been Tested?
Android, play any stream and seek around some times
Types of change