[mythtv] r23304 causes serious problem
Davin McCall
davmac at davmac.org
Wed Jan 27 11:25:36 UTC 2010
Hi all,
r23304:
http://svn.mythtv.org/trac/changeset/23304/trunk/mythtv
... causes a serious issue for me. Whenever I try to watch anything -
live TV, DVD - I get a frozen black screen with "Please wait..." on it.
One time, it eventually started playing (after ~20 seconds) but it
generally seems to freeze completely.
Looking at the patch, the only problems I can see is that it is
accessing some variables (dorun and running) while not always holding a
lock. This "smells" bad to me. I would think that they should at least
be declared volatile; I mean, the compiler is allowed to optimize:
71 while (true)
72 {
73 usleep(microsec);
74 if (!dorun)
75 break;
76 emit timeout();
77 }
... by assuming it can load "dorun" into a register and not reload it
each time it is checked. (not sure but usleep is probably defined to not
have side effects; depends on exact definition in C library header).
Davin
More information about the mythtv-dev
mailing list