summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2015-02-05 14:24:35 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2015-02-05 14:24:35 +0100
commitad45f801d5af3aeb3f22c34e656b3562be96c432 (patch)
tree277747c2404a6f2dc3241983ff340ee6154d2a7e
parentf60d90aeb65c212fd86286029c8af4e71b2215bb (diff)
downloadvdr-ad45f801d5af3aeb3f22c34e656b3562be96c432.tar.gz
vdr-ad45f801d5af3aeb3f22c34e656b3562be96c432.tar.bz2
Fixed cMarks::GetNextBegin() and cMarks::GetNextEnd()
-rw-r--r--HISTORY4
-rw-r--r--recording.c6
2 files changed, 7 insertions, 3 deletions
diff --git a/HISTORY b/HISTORY
index a6659833..9efcf177 100644
--- a/HISTORY
+++ b/HISTORY
@@ -8502,3 +8502,7 @@ Video Disk Recorder Revision History
on a suggestion by Thomas Reufer).
- Updated sources.conf to reflect the fact that Astra 4A and SES5 are actually in
two separate positions (thanks to Arthur Konovalov).
+- Fixed cMarks::GetNextBegin() and cMarks::GetNextEnd(). The behavior of these two
+ functions is now exacly as described in the header file. Editing marks that are
+ placed at exactly the same offset in a recording are now preserved in the cutting
+ process.
diff --git a/recording.c b/recording.c
index 079e0de2..19b36db8 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 3.24 2015/01/25 15:39:24 kls Exp $
+ * $Id: recording.c 3.25 2015/02/05 13:50:39 kls Exp $
*/
#include "recording.h"
@@ -2169,7 +2169,7 @@ cMark *cMarks::GetNext(int Position)
cMark *cMarks::GetNextBegin(cMark *EndMark)
{
cMark *BeginMark = EndMark ? Next(EndMark) : First();
- if (BeginMark) {
+ if (BeginMark && EndMark && BeginMark->Position() == EndMark->Position()) {
while (cMark *NextMark = Next(BeginMark)) {
if (BeginMark->Position() == NextMark->Position()) { // skip Begin/End at the same position
if (!(BeginMark = Next(NextMark)))
@@ -2187,7 +2187,7 @@ cMark *cMarks::GetNextEnd(cMark *BeginMark)
if (!BeginMark)
return NULL;
cMark *EndMark = Next(BeginMark);
- if (EndMark) {
+ if (EndMark && BeginMark && BeginMark->Position() == EndMark->Position()) {
while (cMark *NextMark = Next(EndMark)) {
if (EndMark->Position() == NextMark->Position()) { // skip End/Begin at the same position
if (!(EndMark = Next(NextMark)))