[mythtv] DVD playback issues, patch
Davin McCall
davmac at davmac.org
Fri Nov 13 12:35:36 UTC 2009
Hi all,
Regarding the DVD playback issues I mentioned earlier. This is
(possibly) related to the following tickets:
http://svn.mythtv.org/trac/ticket/7067
http://svn.mythtv.org/trac/ticket/7349
Although I originally found that revision 22120 was causing the issue, I
no longer believe this is the case: that revision just altered the
timing which presented other problems. Basically the code in the AVSync
method in NuppelVideoPlayer.cpp (libs/mythtv/NuppelVideoPlayer.cpp) is
highly suspect and the code in vsync.cpp (same directory) is also
dubious. I posted some questions about this before but received no reply
so I'm assuming that the errors I saw really were errors. In any case,
altering the code as per the patch below fixes the problem for me.
Incidentally one of the problematic revisions seems to be 21665 by gigem:
http://svn.mythtv.org/trac/changeset/21665/trunk/mythtv/libs/libmythtv/NuppelVideoPlayer.cpp
This seems to max out the av sync adjustment to the refresh rate, which
frankly isn't enough as sometimes the per-frame sync drift is higher
than that. I've undone that change in the patch and also set the vsync
delay so that it always tries to exactly re-sync audio and video (well,
it uses avsync_avg which is a weighted average of the sync drift). I
can't think of any reason why it wasn't like that in the first place but
maybe someone can enlighten me. (Perhaps something to do with the fact
that vsync was accumulating the delay rather than using it as a one-off,
see my earlier post).
The other change in the patch takes all the smoothing logic out of
vsync.cpp and leaves it to do what it surely was meant to do:
synchronize to vertical refresh, nothing more, nothing less. In
particular it no longer accrues a large negative trigger delay (which
causes video to playback at a stupidly high speed for an extended period).
I don't know how things work here so if I should be sending this
somewhere else please let me know.
Davin
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.txt
URL: <http://mythtv.org/pipermail/mythtv-dev/attachments/20091113/73860454/attachment.txt>
More information about the mythtv-dev
mailing list