From 6a4d4607e4a422e184f4d809c44968deb0d17778 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Tue, 29 Dec 2009 15:46:12 +0100 Subject: Fixed zero-terminating the pid lists --- remux.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'remux.c') 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; } } } -- cgit v1.2.3