Andreas Brachold wrote:
i like your patch, but its work only on some recordings.
Its failed with a segmentation fault, on cutting.
The only differ are unbalanced marks (out missed)

Confirmed, the patch doesn't handle the case that the last mark is a cut-in mark, not a cut-out. In that case 'Mark' will be NULL, causing a segfault. The attached (untested) patch should do the trick.



Index: cutter.c
--- cutter.c    (revision 895)
+++ cutter.c    (working copy)
@@ -167,8 +167,9 @@
                  uchar MarkFileNumber;
                  int MarkFileOffset;
                  // Get file number of next cut mark
-                 if (fromIndex->Get(Mark->position, &MarkFileNumber, 
-                     && (MarkFileNumber != CurrentFileNumber)) {
+                 if (!Mark 
+                     || fromIndex->Get(Mark->position, &MarkFileNumber, 
+                        && (MarkFileNumber != CurrentFileNumber)) {
                     // The current source file will be copied completely.
                     // Start new output file unless we did that already
                     if (FileSize != 0) {
vdr mailing list

Reply via email to