summaryrefslogtreecommitdiff
path: root/remux.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2009-06-06 13:26:23 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2009-06-06 13:26:23 +0200
commit96d25c3be1ead9d1ecd6e1ffadfb57aa42b22c2b (patch)
tree30b3239ede65e33bfeb36029502c5beb31afb387 /remux.c
parent1f798b0f8e4735fb1c444379f2cfa968e85ccd3a (diff)
downloadvdr-96d25c3be1ead9d1ecd6e1ffadfb57aa42b22c2b.tar.gz
vdr-96d25c3be1ead9d1ecd6e1ffadfb57aa42b22c2b.tar.bz2
Fixed unwanted track modifications when parsing PAT/PMT for recording
Diffstat (limited to 'remux.c')
-rw-r--r--remux.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/remux.c b/remux.c
index f3d0f262..97c139c9 100644
--- a/remux.c
+++ b/remux.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: remux.c 2.23 2009/05/24 11:44:54 kls Exp $
+ * $Id: remux.c 2.24 2009/06/06 13:24:57 kls Exp $
*/
#include "remux.h"
@@ -389,8 +389,9 @@ uchar *cPatPmtGenerator::GetPmt(int &Index)
// --- cPatPmtParser ---------------------------------------------------------
-cPatPmtParser::cPatPmtParser(void)
+cPatPmtParser::cPatPmtParser(bool UpdatePrimaryDevice)
{
+ updatePrimaryDevice = UpdatePrimaryDevice;
Reset();
}
@@ -478,7 +479,8 @@ void cPatPmtParser::ParsePmt(const uchar *Data, int Length)
dbgpatpmt(" pcr = %d\n", Pmt.getPCRPid());
if (pmtVersion == Pmt.getVersionNumber())
return;
- cDevice::PrimaryDevice()->ClrAvailableTracks(false, true);
+ if (updatePrimaryDevice)
+ cDevice::PrimaryDevice()->ClrAvailableTracks(false, true);
int NumApids = 0;
int NumDpids = 0;
int NumSpids = 0;
@@ -522,7 +524,8 @@ void cPatPmtParser::ParsePmt(const uchar *Data, int Length)
}
delete d;
}
- cDevice::PrimaryDevice()->SetAvailableTrack(ttAudio, NumApids, stream.getPid(), ALangs);
+ if (updatePrimaryDevice)
+ cDevice::PrimaryDevice()->SetAvailableTrack(ttAudio, NumApids, stream.getPid(), ALangs);
NumApids++;
}
}
@@ -557,7 +560,8 @@ void cPatPmtParser::ParsePmt(const uchar *Data, int Length)
break;
}
}
- cDevice::PrimaryDevice()->SetAvailableTrack(ttSubtitle, NumSpids, stream.getPid(), SLangs);
+ if (updatePrimaryDevice)
+ cDevice::PrimaryDevice()->SetAvailableTrack(ttSubtitle, NumSpids, stream.getPid(), SLangs);
NumSpids++;
}
break;
@@ -573,7 +577,8 @@ void cPatPmtParser::ParsePmt(const uchar *Data, int Length)
}
if (dpid) {
if (NumDpids < MAXDPIDS) {
- cDevice::PrimaryDevice()->SetAvailableTrack(ttDolby, NumDpids, dpid, lang);
+ if (updatePrimaryDevice)
+ cDevice::PrimaryDevice()->SetAvailableTrack(ttDolby, NumDpids, dpid, lang);
NumDpids++;
}
}
@@ -581,8 +586,10 @@ void cPatPmtParser::ParsePmt(const uchar *Data, int Length)
break;
}
dbgpatpmt("\n");
- cDevice::PrimaryDevice()->EnsureAudioTrack(true);
- cDevice::PrimaryDevice()->EnsureSubtitleTrack();
+ if (updatePrimaryDevice) {
+ cDevice::PrimaryDevice()->EnsureAudioTrack(true);
+ cDevice::PrimaryDevice()->EnsureSubtitleTrack();
+ }
}
pmtVersion = Pmt.getVersionNumber();
}