summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-03-19 01:04:43 +0100
committerCarl Hetherington <cth@carlh.net>2025-03-19 01:08:06 +0100
commit5374dde4a0057066697c4963ce30f025980dc3c1 (patch)
treec63f2abf569c4b0acb908008ead72f0093f14318 /src/lib
parent259ea1fa9e517d51a3c654fadea6c0836b0eb9e6 (diff)
Seek the player before creating a new butler.
Consider the case where we switch to a different sound card when the player GUI is showing frame 0. At this point, the butler will be full up to some readahead, so the player will also "think" it's at the readahead position. If we create a new butler, the first get of video from the new buffer would previously return a frame from the readahead position (because that's where the player was). Since the new butler would coincide with the audio stream position being 0, the video thread would think it was ahead by the ring buffer readahead and so would sleep for quite a long time. Meanwhile audio arrives and is played, and when the video thread finally wakes it is a long time behind the audio.
Diffstat (limited to 'src/lib')
0 files changed, 0 insertions, 0 deletions