summaryrefslogtreecommitdiff
path: root/remux.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2009-12-29 15:46:12 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2009-12-29 15:46:12 +0100
commit6a4d4607e4a422e184f4d809c44968deb0d17778 (patch)
treea82e6f0b9bc50f4fda321e73735f3e623edc39f2 /remux.c
parentb6e76b3bceb3aa091aa9e9aa1610c2fabf439a97 (diff)
downloadvdr-6a4d4607e4a422e184f4d809c44968deb0d17778.tar.gz
vdr-6a4d4607e4a422e184f4d809c44968deb0d17778.tar.bz2
Fixed zero-terminating the pid lists
Diffstat (limited to 'remux.c')
-rw-r--r--remux.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/remux.c b/remux.c
index ec42e87d..712ce3b7 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.35 2009/12/24 12:24:02 kls Exp $
+ * $Id: remux.c 2.36 2009/12/29 15:46:12 kls Exp $
*/
#include "remux.h"
@@ -486,6 +486,9 @@ void cPatPmtParser::ParsePmt(const uchar *Data, int Length)
int NumDpids = 0;
int NumSpids = 0;
vpid = vtype = 0;
+ apids[0] = 0;
+ dpids[0] = 0;
+ spids[0] = 0;
SI::PMT::Stream stream;
for (SI::Loop::Iterator it; Pmt.streamLoop.getNext(stream, it); ) {
dbgpatpmt(" stream type = %02X, pid = %d", stream.getStreamType(), stream.getPid());
@@ -530,6 +533,7 @@ void cPatPmtParser::ParsePmt(const uchar *Data, int Length)
if (updatePrimaryDevice)
cDevice::PrimaryDevice()->SetAvailableTrack(ttAudio, NumApids, apids[NumApids], alangs[NumApids]);
NumApids++;
+ apids[NumApids]= 0;
}
}
break;
@@ -573,6 +577,7 @@ void cPatPmtParser::ParsePmt(const uchar *Data, int Length)
if (updatePrimaryDevice)
cDevice::PrimaryDevice()->SetAvailableTrack(ttSubtitle, NumSpids, spids[NumSpids], slangs[NumSpids]);
NumSpids++;
+ spids[NumSpids]= 0;
}
break;
case SI::ISO639LanguageDescriptorTag: {
@@ -592,6 +597,7 @@ void cPatPmtParser::ParsePmt(const uchar *Data, int Length)
if (updatePrimaryDevice)
cDevice::PrimaryDevice()->SetAvailableTrack(ttDolby, NumDpids, dpid, lang);
NumDpids++;
+ dpids[NumDpids]= 0;
}
}
}