[mythtv] [PATCH] pcHDTV - Rewrite PIDs in PMT and PAT tables of
recorded streams
Jason Hoos
jhoos at thwack.net
Thu Oct 30 03:37:51 EST 2003
Since I was bound and determined this week to get both of my whopping 2 HDTV
stations working (I really need to get my condo association to fix the roof
antenna!), attached is another patch for hdtvrecorder. This one adds code to
rewrite the stream PIDs that are in the PAT and PMT tables. This came about
because one of the stations I get has 4 substations, and they list them in
reverse order in the PAT, which caused ffmpeg major headaches. hdtvrecorder
stripped out all but program 2 (they were numbered 2-5), and ffmpeg tried to
grab the first station that was listed in the PAT, which was program 5. It
then promptly died with an obscure "avformat error: -1" message.
This patch adds two private methods to hdtvreceiver called RewritePAT and
RewritePMT. In addition to changing the PIDs in these tables to match the
PIDs that are really being written to disk, they also change the program
number of the output stream to 1. Most importantly (with regards to the
above problem), RewritePAT removes mention of the other programs from the PAT
and leaves only the one that's actually in the file.
I've put this (and my previous patch) through a small battery of
channel-changing and recording tests, and it seems to be working pretty well
for the two stations I can test it with.
- Jason
More information about the mythtv-dev
mailing list