1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed getting the number of editing sequences in case the last sequence has no actual end mark

This commit is contained in:
Klaus Schmidinger 2012-11-26 09:39:59 +01:00
parent 75aee155ea
commit 4db9a3b636
2 changed files with 9 additions and 4 deletions

View File

@ -7339,7 +7339,7 @@ Video Disk Recorder Revision History
- Modified editing marks are now written to disk whenever the replay progress display - Modified editing marks are now written to disk whenever the replay progress display
gets hidden (thanks to Christoph Haubrich). gets hidden (thanks to Christoph Haubrich).
2012-11-25: Version 1.7.33 2012-11-26: Version 1.7.33
- In order to be able to play TS recordings from other sources, in which there is - In order to be able to play TS recordings from other sources, in which there is
more than one PMT PID in the PAT, 'int cPatPmtParser::PatPmt(void)' has been changed more than one PMT PID in the PAT, 'int cPatPmtParser::PatPmt(void)' has been changed
@ -7349,3 +7349,5 @@ Video Disk Recorder Revision History
- Fixed getting only non-video packets in cCuttingThread::GetPendingPackets() (reported - Fixed getting only non-video packets in cCuttingThread::GetPendingPackets() (reported
by Sören Moch). by Sören Moch).
- Changed all occurrences of MPEG4 to H264 (pointed out by Sören Moch). - Changed all occurrences of MPEG4 to H264 (pointed out by Sören Moch).
- Fixed getting the number of editing sequences in case the last sequence has no actual
end mark.

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 2.74 2012/11/19 10:01:01 kls Exp $ * $Id: recording.c 2.75 2012/11/26 09:39:59 kls Exp $
*/ */
#include "recording.h" #include "recording.h"
@ -1498,8 +1498,11 @@ int cMarks::GetNumSequences(void)
NumSequences++; NumSequences++;
BeginMark = GetNextBegin(EndMark); BeginMark = GetNextBegin(EndMark);
} }
if (NumSequences == 0 && BeginMark->Position() > 0) if (BeginMark) {
NumSequences = 1; // there is only one actual "begin" mark at a non-zero offset, and no actual "end" mark NumSequences++; // the last sequence had no actual "end" mark
if (NumSequences == 1 && BeginMark->Position() == 0)
NumSequences = 0; // there is only one actual "begin" mark at offset zero, and no actual "end" mark
}
} }
return NumSequences; return NumSequences;
} }