Hard link cutter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Cheers,

Udo

-------------- next part --------------
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, &MarkFileOffset)
-                     && (MarkFileNumber != CurrentFileNumber)) {
+                 if (!Mark 
+                     || fromIndex->Get(Mark->position, &MarkFileNumber, &MarkFileOffset)
+                        && (MarkFileNumber != CurrentFileNumber)) {
                     // The current source file will be copied completely.
                     // Start new output file unless we did that already
                     if (FileSize != 0) {

[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux