mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed cutting a recording if there is only a single editing mark
This commit is contained in:
parent
743a3ec123
commit
7a5ef9e999
@ -678,3 +678,6 @@ Lars Bl
|
|||||||
|
|
||||||
Niko Tarnanen <niko.tarnanen@hut.fi> and Rolf Ahrenberg <rahrenbe@cc.hut.fi>
|
Niko Tarnanen <niko.tarnanen@hut.fi> and Rolf Ahrenberg <rahrenbe@cc.hut.fi>
|
||||||
for translating OSD texts to the Finnish language
|
for translating OSD texts to the Finnish language
|
||||||
|
|
||||||
|
Ralf Klueber <ralf.klueber@vodafone.com>
|
||||||
|
for reporting a bug in cutting a recording if there is only a single editing mark
|
||||||
|
2
HISTORY
2
HISTORY
@ -2184,3 +2184,5 @@ Video Disk Recorder Revision History
|
|||||||
to Oliver Endriss).
|
to Oliver Endriss).
|
||||||
- Fixed resume file handling in case the resume.vdr file can't be written
|
- Fixed resume file handling in case the resume.vdr file can't be written
|
||||||
(thanks to Gerhard Steiner).
|
(thanks to Gerhard Steiner).
|
||||||
|
- Fixed cutting a recording if there is only a single editing mark (thanks to
|
||||||
|
Ralf Klueber for reporting this one).
|
||||||
|
10
cutter.c
10
cutter.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: cutter.c 1.3 2003/04/26 15:11:17 kls Exp $
|
* $Id: cutter.c 1.4 2003/05/24 11:59:33 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "cutter.h"
|
#include "cutter.h"
|
||||||
@ -77,6 +77,7 @@ void cCuttingThread::Action(void)
|
|||||||
toMarks.Add(0);
|
toMarks.Add(0);
|
||||||
toMarks.Save();
|
toMarks.Save();
|
||||||
uchar buffer[MAXFRAMESIZE];
|
uchar buffer[MAXFRAMESIZE];
|
||||||
|
bool LastMark = false;
|
||||||
bool cutIn = true;
|
bool cutIn = true;
|
||||||
while (active) {
|
while (active) {
|
||||||
uchar FileNumber;
|
uchar FileNumber;
|
||||||
@ -116,7 +117,7 @@ void cCuttingThread::Action(void)
|
|||||||
// Write one frame:
|
// Write one frame:
|
||||||
|
|
||||||
if (PictureType == I_FRAME) { // every file shall start with an I_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;
|
break;
|
||||||
if (FileSize > MEGABYTE(Setup.MaxVideoFileSize)) {
|
if (FileSize > MEGABYTE(Setup.MaxVideoFileSize)) {
|
||||||
toFile = toFileName->NextFile();
|
toFile = toFileName->NextFile();
|
||||||
@ -167,9 +168,8 @@ void cCuttingThread::Action(void)
|
|||||||
FileSize = 0;
|
FileSize = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// the 'else' case (i.e. 'final end mark reached') is handled above
|
else
|
||||||
// in 'Write one frame', so that the edited version will end right
|
LastMark = true;
|
||||||
// before the next I-frame.
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user