diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2001-09-16 09:53:44 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2001-09-16 09:53:44 +0200 |
commit | e7ef8190c26e697bd4aae89aee96cf572e48a658 (patch) | |
tree | 9b857da6eacaf4e1b0fe9b309133c336bd1cfa76 | |
parent | 24883d3d230de881aff84cbf52ce8323c2cf353c (diff) | |
download | vdr-e7ef8190c26e697bd4aae89aee96cf572e48a658.tar.gz vdr-e7ef8190c26e697bd4aae89aee96cf572e48a658.tar.bz2 |
Fixed manipulating an editing mark at the very end of a recording
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | dvbapi.c | 11 |
2 files changed, 8 insertions, 4 deletions
@@ -752,3 +752,4 @@ Video Disk Recorder Revision History - New version of the "Master-Timer" tool (thanks to Matthias Schniedermeyer). - Better error handling when writing configuration files. - Fixed putting the final editing mark into the edited version's marks file. +- Fixed manipulating an editing mark at the very end of a recording. @@ -7,7 +7,7 @@ * DVD support initially written by Andreas Schultz <aschultz@warp10.net> * based on dvdplayer-0.5 by Matjaz Thaler <matjaz.thaler@guest.arnes.si> * - * $Id: dvbapi.c 1.122 2001/09/16 09:35:51 kls Exp $ + * $Id: dvbapi.c 1.123 2001/09/16 09:52:57 kls Exp $ */ //#define DVDDEBUG 1 @@ -284,7 +284,7 @@ int cIndexFile::GetNextIFrame(int Index, bool Forward, uchar *FileNumber, int *F int d = Forward ? 1 : -1; for (;;) { Index += d; - if (Index >= 0 && Index <= last - 100) { // '- 100': need to stay off the end! + if (Index >= 0 && Index <= last) { if (index[Index].type == I_FRAME) { if (FileNumber) *FileNumber = index[Index].number; @@ -2364,6 +2364,8 @@ void cCuttingBuffer::Action(void) // 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 + break; if (FileSize > MEGABYTE(Setup.MaxVideoFileSize)) { toFile = toFileName->NextFile(); if (toFile < 0) @@ -2391,8 +2393,9 @@ void cCuttingBuffer::Action(void) Mark = fromMarks.Next(Mark); CurrentFileNumber = 0; // triggers SetOffset before reading next frame } - else - break; // final end mark reached + // 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. } } } |