[mythtv] Channel changing Bugs...

jasonmiller jasonmiller at micron.com
Mon Apr 7 15:02:24 EDT 2003


Here's a patch to allow for four digit channels.  I think I got all the spots it was hardcoded.  Works for the EPG 'x' and 'm' keys as well as channels keyed into mythtv.  Probably should fix this so it will work for arbitrarily long channel numbers but I wasn't quite that motivated :)

Index: MC/libs/libmythtv/tv_play.cpp
===================================================================
RCS file: /var/lib/cvs/MC/libs/libmythtv/tv_play.cpp,v
retrieving revision 1.41
diff -u -r1.41 tv_play.cpp
--- MC/libs/libmythtv/tv_play.cpp       31 Mar 2003 16:44:20 -0000      1.41
+++ MC/libs/libmythtv/tv_play.cpp       7 Apr 2003 20:01:04 -0000
@@ -689,8 +689,8 @@
     int pausecheck = 0;

     channelqueued = false;
-    channelKeys[0] = channelKeys[1] = channelKeys[2] = ' ';
-    channelKeys[3] = 0;
+    channelKeys[0] = channelKeys[1] = channelKeys[2] = channelKeys[3] = ' ';
+    channelKeys[4] = 0;
     channelkeysstored = 0;

     runMainLoop = true;
@@ -1396,7 +1396,7 @@
     activenvp->Unpause();

     channelqueued = false;
-    channelKeys[0] = channelKeys[1] = channelKeys[2] = ' ';
+    channelKeys[0] = channelKeys[1] = channelKeys[2] = channelKeys[3] = ' ';
     channelkeysstored = 0;

     if (muted)
@@ -1410,21 +1410,22 @@
     if (key > 256)
         thekey = key - 256 - 0xb0 + '0';

-    if (channelkeysstored == 3)
+    if (channelkeysstored == 4)
     {
         channelKeys[0] = channelKeys[1];
         channelKeys[1] = channelKeys[2];
-        channelKeys[2] = thekey;
+        channelKeys[2] = channelKeys[3];
+        channelKeys[3] = thekey;
     }
     else
     {
         channelKeys[channelkeysstored] = thekey;
         channelkeysstored++;
     }
-    channelKeys[3] = 0;
+    channelKeys[4] = 0;

     if (activenvp == nvp)
-        osd->SetChannumText(channelKeys, 2);
+        osd->SetChannumText(channelKeys, 3);

     channelqueued = true;
 }
@@ -1446,7 +1447,7 @@
     ChangeChannelByString(chan);

     channelqueued = false;
-    channelKeys[0] = channelKeys[1] = channelKeys[2] = ' ';
+    channelKeys[0] = channelKeys[1] = channelKeys[2] = channelKeys[3] = ' ';
     channelkeysstored = 0;
 }

@@ -1550,7 +1551,7 @@

     if (chanstr != "")
     {
-        chanstr = chanstr.left(3);
+        chanstr = chanstr.left(4);
         sprintf(channelKeys, "%s", chanstr.ascii());
         channelqueued = true;
     }
@@ -1667,7 +1668,7 @@
 {
     if (chanstr != "")
     {
-        chanstr = chanstr.left(3);
+        chanstr = chanstr.left(4);
         sprintf(channelKeys, "%s", chanstr.ascii());
         channelqueued = true;
     }
Index: MC/libs/libmythtv/tv_play.h
===================================================================
RCS file: /var/lib/cvs/MC/libs/libmythtv/tv_play.h,v
retrieving revision 1.24
diff -u -r1.24 tv_play.h
--- MC/libs/libmythtv/tv_play.h 31 Mar 2003 16:44:20 -0000      1.24
+++ MC/libs/libmythtv/tv_play.h 7 Apr 2003 20:01:04 -0000
@@ -115,7 +115,7 @@
     int osd_display_time;

     bool channelqueued;
-    char channelKeys[4];
+    char channelKeys[5];
     int channelkeysstored;

     bool menurunning;

-----Original Message-----
From: jasonmiller [mailto:jasonmiller at micron.com]
Sent: Monday, April 07, 2003 9:49 AM
To: 'Development of mythtv'
Subject: [mythtv] Channel changing Bugs...


As far as I can tell, MythTV won't change to a four digit channel number, no error or anything, just does nothing.  I'm running a DishNetwork Satellite receiver and have had this problem for quite a while.  Not a big deal but still an issue.

Also, I'm getting a segfault when trying to change to channels in the 100 - 109 range.  No idea why that is.  I'll follow up with a backtrace in a bit.  Any suggestions?
_______________________________________________
mythtv-dev mailing list
mythtv-dev at snowman.net
http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-dev


More information about the mythtv-dev mailing list