[mythtv-commits] [MythTV/mythtv] 10c2a6: Improve A/V sync when playing close to end of in-p...

David Engel noreply at github.com
Fri Aug 5 01:27:52 UTC 2022


  Branch: refs/heads/master
  Home:   https://github.com/MythTV/mythtv
  Commit: 10c2a674079059689dde667b1e424336ea14fd2c
      https://github.com/MythTV/mythtv/commit/10c2a674079059689dde667b1e424336ea14fd2c
  Author: David Engel <dengel at 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.




More information about the mythtv-commits mailing list