When regenerating the index of a recording, PID changes are now taken into account

This commit is contained in:
Klaus Schmidinger
2025-06-27 08:46:07 +02:00
parent 6f0305a95d
commit 6ed8db5ecd
3 changed files with 19 additions and 3 deletions

View File

@@ -2475,6 +2475,8 @@ Christoph Haubrich <christoph1.haubrich@arcor.de>
for adding a workaround in detecting frame height for channels with wrong crop parameters for adding a workaround in detecting frame height for channels with wrong crop parameters
for reporting duplicate component entries in the info of an ongoing recording for reporting duplicate component entries in the info of an ongoing recording
for reporting a problem where the info file of an ongoing recording was not re-read for reporting a problem where the info file of an ongoing recording was not re-read
for reporting that some channels change their video PID in the middle of a broadcast,
which needs to be taken into account when regenerating the index of a recording
Pekka Mauno <pekka.mauno@iki.fi> Pekka Mauno <pekka.mauno@iki.fi>
for fixing cSchedule::GetFollowingEvent() in case there is currently no present for fixing cSchedule::GetFollowingEvent() in case there is currently no present

View File

@@ -10138,6 +10138,8 @@ Video Disk Recorder Revision History
- Fixed an invalid lock sequence when pressing the Channel+/Channel- keys while in the - Fixed an invalid lock sequence when pressing the Channel+/Channel- keys while in the
"What's on..." menu in live view. "What's on..." menu in live view.
2025-06-23: 2025-06-27:
- Fixed cPoller::Poll() to allow negative timeout values again. - Fixed cPoller::Poll() to allow negative timeout values again.
- When regenerating the index of a recording, PID changes are now taken into account
(reported by Christoph Haubrich).

View File

@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: recording.c 5.42 2025/06/19 13:35:32 kls Exp $ * $Id: recording.c 5.43 2025/06/27 08:46:07 kls Exp $
*/ */
#include "recording.h" #include "recording.h"
@@ -2604,8 +2604,20 @@ void cIndexFileGenerator::Action(void)
if (Data) { if (Data) {
if (FrameDetector.Synced()) { if (FrameDetector.Synced()) {
// Step 3 - generate the index: // Step 3 - generate the index:
if (TsPid(Data) == PATPID) if (TsPid(Data) == PATPID) {
int OldPatVersion, OldPmtVersion;
PatPmtParser.GetVersions(OldPatVersion, OldPmtVersion);
if (PatPmtParser.ParsePatPmt(Data, Length)) {
int NewPatVersion, NewPmtVersion;
if (PatPmtParser.GetVersions(NewPatVersion, NewPmtVersion)) {
if (NewPatVersion != OldPatVersion || NewPmtVersion != OldPmtVersion) {
dsyslog("PAT/PMT version change while generating index");
FrameDetector.SetPid(PatPmtParser.Vpid() ? PatPmtParser.Vpid() : PatPmtParser.Apid(0), PatPmtParser.Vpid() ? PatPmtParser.Vtype() : PatPmtParser.Atype(0));
}
}
}
FrameOffset = FileSize; // the PAT/PMT is at the beginning of an I-frame FrameOffset = FileSize; // the PAT/PMT is at the beginning of an I-frame
}
int Processed = FrameDetector.Analyze(Data, Length); int Processed = FrameDetector.Analyze(Data, Length);
if (Processed > 0) { if (Processed > 0) {
int PreviousErrors = 0; int PreviousErrors = 0;