Mailing List Archive

[MythTV/mythtv] 10c2a6: Improve A/V sync when playing close to end of in-p...
Branch: refs/heads/master
Home: https://github.com/MythTV/mythtv
Commit: 10c2a674079059689dde667b1e424336ea14fd2c
https://github.com/MythTV/mythtv/commit/10c2a674079059689dde667b1e424336ea14fd2c
Author: David Engel <dengel@mythtv.org>
Date: 2022-08-04 (Thu, 04 Aug 2022)

Changed paths:
M mythtv/libs/libmythtv/mythplayer.cpp
M mythtv/libs/libmythtv/mythplayer.h
M mythtv/libs/libmythtv/mythplayeravsync.cpp
M mythtv/libs/libmythtv/mythplayeravsync.h

Log Message:
-----------
Improve A/V sync when playing close to end of in-progress recordings.

MythTV has long had issues quickly achieving stable, A/V sync when
playing close to the end of an in-progress recording. This is most
easily seen when entering live TV or changing channels. The previous
round of changes in this area were an improvement but still leaves
cases where there are small stutters every few seconds that never end.
This commit attempts to fix that.

The main, previous change in this area pauses the audio when video
buffering occurs and near the end. The audio is unpaused by the
normal, A/V, sync code when it thinks the sync is close enough. This
commit tweaks that behavior to keep the audio paused until the video
has fully caught up. I've been using this patch for several months
with no ill effects so I think it's safe to commit to master.

Note that the patch looks bigger than it really is due to the
re-ordering of an if statement in MythPlayer::PrebufferEnoughFrames().
That change makes an early return cleaner and simplifies the logic
flow.

Also note that Music Choice channels still present challenging
problems for MythTV. mythplayer is not really designed for content
with very, low, video, frame rates. The MusicChoiceEnabled setting
still needs to be set to reliably play NC channels. With this change,
however, I think it should be easier to automatically detect MC
channels without the need of a special setting. That hasn't been done
yet, though.


_______________________________________________
mythtv-commits mailing list
mythtv-commits@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-commits