[mythtv] [PATCH] DVB video and audio pid validation
Michael Hutchinson
m_j_hutchinson2003 at yahoo.co.uk
Mon Sep 29 20:01:40 EDT 2003
After updating to the latest cvs and the latest DVB patch,
(dvb-alpha-0.5.tar.bz2) I noticed that my system would no longer tune to
certain channels. From the verbose output it appeared that some of the PIDs
were not being past through to the card (Nebula DigiTV). Examination of the
pid validation code in dvbchannels.cpp and dvbrecorder.cpp shows that video
and audio must PIDs be greater than 255 (0xFF) to be considered valid.
However on my local transmitter, Winter Hill, there are a number of channels
with pids less than this. The patch changes the threshold to 100 (0x64)
which fixes the problem for me.
diff -Naur mythtv-org/libs/libmythtv/dvbchannel.cpp
mythtv/libs/libmythtv/dvbchannel.cpp
--- mythtv-org/libs/libmythtv/dvbchannel.cpp 2003-09-29 18:27:22.000000000
+0100
+++ mythtv/libs/libmythtv/dvbchannel.cpp 2003-09-29 18:25:59.000000000 +0100
@@ -408,13 +408,13 @@
for (unsigned int i=0; i<audio.size(); i++)
{
- if (audio[i].toInt() > 0xff)
+ if (audio[i].toInt() > 0x64)
pids.audio.push_back(audio[i].toInt());
}
for (unsigned int i=0; i<video.size(); i++)
{
- if (video[i].toInt() > 0xff)
+ if (video[i].toInt() > 0x64)
pids.video.push_back(video[i].toInt());
}
diff -Naur mythtv-org/libs/libmythtv/dvbrecorder.cpp
mythtv/libs/libmythtv/dvbrecorder.cpp
--- mythtv-org/libs/libmythtv/dvbrecorder.cpp 2003-09-28 22:35:52.000000000
+0100
+++ mythtv/libs/libmythtv/dvbrecorder.cpp 2003-09-28 13:55:01.000000000 +0100
@@ -191,9 +191,9 @@
{
int this_pid = pids[i];
- if (this_pid < 0x100 || this_pid > 0x1fff)
+ if (this_pid < 0x065 || this_pid > 0x1fff)
{
- ERR(QString("PID Value (%1) out of range
(0xff-0x1fff).").arg(this_pid));
+ ERR(QString("PID Value (%1) out of range
(0x64-0x1fff).").arg(this_pid));
continue;
}
I hope this helps !
Mike
More information about the mythtv-dev
mailing list