diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2012-11-26 09:39:59 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2012-11-26 09:39:59 +0100 |
commit | 4db9a3b636d9f2615345fff8e7edf384fce4ac4a (patch) | |
tree | c9f49baadae2ffa7554af52a5ec322d530f45b4a /recording.c | |
parent | 75aee155ea67e6383df712d041f98190ced0ca65 (diff) | |
download | vdr-4db9a3b636d9f2615345fff8e7edf384fce4ac4a.tar.gz vdr-4db9a3b636d9f2615345fff8e7edf384fce4ac4a.tar.bz2 |
Fixed getting the number of editing sequences in case the last sequence has no actual end mark
Diffstat (limited to 'recording.c')
-rw-r--r-- | recording.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/recording.c b/recording.c index 8e677c89..08a5e4d0 100644 --- a/recording.c +++ b/recording.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * 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" @@ -1498,8 +1498,11 @@ int cMarks::GetNumSequences(void) NumSequences++; BeginMark = GetNextBegin(EndMark); } - if (NumSequences == 0 && BeginMark->Position() > 0) - NumSequences = 1; // there is only one actual "begin" mark at a non-zero offset, and no actual "end" mark + if (BeginMark) { + 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; } |