[mythtv] Re: Playback problems with mythtv 0.17
Robson Braga Araujo
robson at akwan.com.br
Sun Mar 6 15:37:21 UTC 2005
On Fri, Mar 04, 2005 at 08:50:57PM -0300, Robson Braga Araujo wrote:
> Hello,
>
> I'm having playback problems since I upgraded from 0.16 to 0.17. The
> video plays too fast, gets ahead of the audio and generates tons of
> prebuffering pause messages. I tried the latest cvs version, but no
> luck. This happens if I'm watching live TV or any prerecorded show (no
> prebuffering pauses here, obviously).
>
> I have a PVR-250. I tested with the drivers 0.1.9 and 0.3.2f. I'm also
> using a SB Live! and a nvidia GeForce2 MX/MX 400 with the latest
> drivers.
>
> I ran 0.16 (which plays fine) and 0.17 with -v all and generated too log
> files for comparison. They are here:
>
> http://valfenda.cjb.net/~robson/log.0.16
> http://valfenda.cjb.net/~robson/log.0.17
>
> Do you need any more information?
> Thanks for any help.
After a good saturday trying different CVS versions to see when the bug
appeared, I discovered that it is in the method
OpenGLVideoSync::WaitForFrame in libs/libmythtv/vsync.cpp.
If I use another sync method like RTCVideoSync or BusyWaitVideoSync
everything works fine.
The change that introduced the bug appeared between 2004-09-25 and
2004-09-26. The OpenGLVideoSync::WaitForFrame used to have a loop that
did not exit until m_delay was less than or equal 0. It was substituted
by two ifs that I'm guessing should do the same thing but they don't.
I tried reverting the OpenGLVideoSync::WaitForFrame method to the old
version in the current CVS and now everything is working. The attached
patch changes the first if for a while and gets rid of the second if
because it would never be entered this way.
Is it the right way to do it?
--
[]s,
Robson Braga Araujo
Ciencia da Computacao - UFMG http://www.dcc.ufmg.br/
Akwan Information Technologies http://www.akwan.com.br/
What do you get when you cross a cantaloupe with lassie? A melon-collie
baby! Get it?? HA HA HA OH OH HA HA! -- Calvin
-------------- next part --------------
--- mythtv-0.17.old/libs/libmythtv/vsync.cpp 2005-02-11 02:21:24.000000000 -0200
+++ mythtv-0.17/libs/libmythtv/vsync.cpp 2005-03-06 12:30:13.000000000 -0300
@@ -512,7 +512,7 @@
//cerr << "WaitForFrame at : " << m_delay;
// Always sync to the next retrace execpt when we are very late.
- if (m_delay > -(m_refresh_interval/2))
+ while (m_delay > -(m_refresh_interval/2))
{
r = glXMakeCurrent(m_display, m_drawable, m_context);
r = glXGetVideoSyncSGI(&count);
@@ -521,16 +521,6 @@
//cerr << "\tDelay at sync: " << m_delay;
}
//cerr << endl;
-
- if (m_delay > 0)
- {
- // Wait for any remaining retrace intervals in one pass.
- n = m_delay / m_refresh_interval + 1;
- r = glXWaitVideoSyncSGI((n+1), (count+n)%(n+1), &count);
- m_delay = CalcDelay();
- //cerr << "Wait " << n << " intervals. Count " << count;
- //cerr << " Delay " << m_delay << endl;
- }
}
void OpenGLVideoSync::AdvanceTrigger()
More information about the mythtv-dev
mailing list