[mythtv-users] MythTV CVS, Change to non-existant channel, lose audio (Fix Included)

Joe V joevph at yahoo.com
Fri Aug 15 13:18:47 EDT 2003


I'm using CVS from August 11, and I'm noticing
something interesting.  I didn't see anything in the
archives about this, so maybe it's not a known
problem.

I'm using a bttv card, and my valid channel range is
from 2-82 (according to what XMLTV pulls in).

Here's the issue.  If I change the channel to
something outside of that range (say I'm trying to
change to channel 11, and the second 1 goes missing
due to high CPU load or something), then I lose audio.
 The audio does not come back when I change channels,
the only way to get it back is to exit out of Live TV
mode, and re-enter it.

It looks like the volume is being muted before the
channel change and not being restored when it's found
that the channel change is invalid.

This is easily reproducable, start Live TV, verify
that audio is there.  Try changing to channel 0 or
channel 1, or even channel 99 (in my area).  Audio is
shut off, the channel doesn't change though because
it's out of range.

Here's a diff that I made that fixes the problem in my
testing.  Basically what it does, it checks the
channel number that we want to change to, to make sure
it's a legit channel.  If it's not, then we don't mute
the volume, we don't attempt to make the channel
change.

Been a while since I've made a patch, but this should
cleanly apply.  :)

-- Joe

--- tv_play.cpp.bkup    2003-08-15 12:04:14.000000000
-0700
+++ tv_play.cpp 2003-08-15 12:14:17.000000000 -0700
@@ -1725,16 +1725,18 @@
 {
     bool muted = false;

+    // Joe "The Vulture" Votour -- 08/15/2003
+    // Check the channel before we mute it - if
there's a probem with it, then
+    // we don't lose sound this way.
+    if (!activerecorder->CheckChannel(name))
+        return;
+
     if (volumeControl && !volumeControl->GetMute() &&
activenvp == nvp)
     {
         volumeControl->ToggleMute();
         muted = true;
     }

-    if (!activerecorder->CheckChannel(name))
-        return;
-    }
-
     if (activenvp == nvp)
     {
         if (paused)

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


More information about the mythtv-users mailing list