diff options
-rw-r--r-- | markad-standalone.cpp | 11 | ||||
-rw-r--r-- | markad-standalone.h | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/markad-standalone.cpp b/markad-standalone.cpp index 2521986..823e0ce 100644 --- a/markad-standalone.cpp +++ b/markad-standalone.cpp @@ -112,7 +112,7 @@ void cMarkAdStandalone::SaveFrame(int frame) fclose(pFile); } -void cMarkAdStandalone::CheckIndex() +void cMarkAdStandalone::CheckIndex(bool NoLastFrameCheck) { // Here we check the indexfile // if we have an index we check if the @@ -132,7 +132,10 @@ void cMarkAdStandalone::CheckIndex() if (stat(indexFile,&statbuf)==-1) return; int maxframes=statbuf.st_size/8; - if (lastmaxframes==maxframes) return; // no new frames still last call! + if (NoLastFrameCheck) + { + if (lastmaxframes==maxframes) return; // no new frames still last call! + } if (maxframes<(framecnt+200)) { @@ -181,7 +184,7 @@ bool cMarkAdStandalone::ProcessFile(const char *Directory, int Number) free(fbuf); if (f==-1) return false; - CheckIndex(); + CheckIndex(true); if (abort) return false; int dataread; @@ -331,7 +334,7 @@ bool cMarkAdStandalone::ProcessFile(const char *Directory, int Number) } } } - CheckIndex(); + CheckIndex(false); if (abort) { if (f!=-1) close(f); diff --git a/markad-standalone.h b/markad-standalone.h index 841b23d..884a663 100644 --- a/markad-standalone.h +++ b/markad-standalone.h @@ -167,7 +167,7 @@ unsigned Descriptor_Length: bool bIgnoreAudioInfo; bool bIgnoreVideoInfo; - void CheckIndex(); + void CheckIndex(bool NoLastFrameCheck); char *indexFile; int sleepcnt; int lastmaxframes; |