1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed starting a recording at an I-frame

This commit is contained in:
Klaus Schmidinger 2009-11-15 15:33:55 +01:00
parent ff858b78a3
commit 2db303d6f5
2 changed files with 25 additions and 20 deletions

View File

@ -6157,7 +6157,7 @@ Video Disk Recorder Revision History
Reinhard Nissl). Reinhard Nissl).
- Implemented full handling of subtitling descriptors (thanks to Mikko Tuumanen). - Implemented full handling of subtitling descriptors (thanks to Mikko Tuumanen).
2009-11-06: Version 1.7.10 2009-11-15: Version 1.7.10
- Updated the Italian OSD texts (thanks to Diego Pierotto). - Updated the Italian OSD texts (thanks to Diego Pierotto).
- Fixed wrong bracketing in cChannel::SubtitlingType() etc. - Fixed wrong bracketing in cChannel::SubtitlingType() etc.
@ -6179,3 +6179,4 @@ Video Disk Recorder Revision History
- Added Slovakian language texts (thanks to Milan Hrala). - Added Slovakian language texts (thanks to Milan Hrala).
- Fixed EntriesOnSameFileSystem() to avoid using f_fsid, which may be 0 (thanks - Fixed EntriesOnSameFileSystem() to avoid using f_fsid, which may be 0 (thanks
to Frank Schmirler). to Frank Schmirler).
- Fixed starting a recording at an I-frame.

View File

@ -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: recorder.c 2.4 2009/05/23 12:18:25 kls Exp $ * $Id: recorder.c 2.5 2009/11/15 15:27:08 kls Exp $
*/ */
#include "recorder.h" #include "recorder.h"
@ -116,6 +116,7 @@ void cRecorder::Action(void)
{ {
time_t t = time(NULL); time_t t = time(NULL);
bool InfoWritten = false; bool InfoWritten = false;
bool FirstIframeSeen = false;
while (Running()) { while (Running()) {
int r; int r;
uchar *b = ringBuffer->Get(r); uchar *b = ringBuffer->Get(r);
@ -134,6 +135,8 @@ void cRecorder::Action(void)
} }
InfoWritten = true; InfoWritten = true;
} }
if (FirstIframeSeen || frameDetector->IndependentFrame()) {
FirstIframeSeen = true; // start recording with the first I-frame
if (!NextFile()) if (!NextFile())
break; break;
if (index && frameDetector->NewFrame()) if (index && frameDetector->NewFrame())
@ -154,6 +157,7 @@ void cRecorder::Action(void)
fileSize += Count; fileSize += Count;
t = time(NULL); t = time(NULL);
} }
}
ringBuffer->Del(Count); ringBuffer->Del(Count);
} }
} }