Fixed generating PAT/PMT version numbers in case the PIDs change during recording

This commit is contained in:
Klaus Schmidinger
2009-05-24 15:11:28 +02:00
parent 6cdfb489ae
commit e51e38bc33
7 changed files with 91 additions and 8 deletions

View File

@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: recorder.c 2.3 2009/03/20 15:49:02 kls Exp $
* $Id: recorder.c 2.4 2009/05/23 12:18:25 kls Exp $
*/
#include "recorder.h"
@@ -44,12 +44,14 @@ cRecorder::cRecorder(const char *FileName, tChannelID ChannelID, int Priority, i
Type = 0x06;
}
frameDetector = new cFrameDetector(Pid, Type);
patPmtGenerator.SetChannel(Channel);
fileName = NULL;
index = NULL;
fileSize = 0;
lastDiskSpaceCheck = time(NULL);
fileName = new cFileName(FileName, true);
int PatVersion, PmtVersion;
if (fileName->GetLastPatPmtVersions(PatVersion, PmtVersion))
patPmtGenerator.SetVersions(PatVersion + 1, PmtVersion + 1);
patPmtGenerator.SetChannel(Channel);
recordFile = fileName->Open();
if (!recordFile)
return;