Mailing List archive

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

[vdr] Re: Bug Report - Cutting failed with only one mark set



Ralf Klueber wrote:
> 
> In the morning I played with VDR and I thought I found a little bug. I
> cut movie and I set one mark at the beginning to cut the rest of the
> commercials in front of the film, but I DONT set a mark at the end of
> the film.
> 
> Than I pressed "2" to start the cutting process. VDR started the cutting
> process and ended without an error or something, but viewing the cutted
> movie was not possible.
> 
> I expected that VDR cuts the film from my first mark till the last
> (I-)Frame, because the hole timeline is marked as red in the overview.
> But that is not how VDR is dealing with that. The solution was to set a
> mark at the end of the film and start the cutting process again.

This should fix it:

--- cutter.c    2003/04/26 15:11:17     1.3
+++ cutter.c    2003/05/24 11:59:33
@@ -77,6 +77,7 @@
      toMarks.Add(0);
      toMarks.Save();
      uchar buffer[MAXFRAMESIZE];
+     bool LastMark = false;
      bool cutIn = true;
      while (active) {
            uchar FileNumber;
@@ -116,7 +117,7 @@
            // Write one frame:
 
            if (PictureType == I_FRAME) { // every file shall start with an I_FRAME
-              if (!Mark) // edited version shall end before next I-frame
+              if (LastMark) // edited version shall end before next I-frame
                  break;
               if (FileSize > MEGABYTE(Setup.MaxVideoFileSize)) {
                  toFile = toFileName->NextFile();
@@ -167,9 +168,8 @@
                     FileSize = 0;
                     }
                  }
-              // the 'else' case (i.e. 'final end mark reached') is handled above
-              // in 'Write one frame', so that the edited version will end right
-              // before the next I-frame.
+              else
+                 LastMark = true;
               }
            }
      }


Klaus
-- 
_______________________________________________________________

Klaus Schmidinger                       Phone: +49-8635-6989-10
CadSoft Computer GmbH                   Fax:   +49-8635-6989-40
Hofmark 2                               Email:   kls@cadsoft.de
D-84568 Pleiskirchen, Germany           URL:     www.cadsoft.de
_______________________________________________________________


-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index