summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--command/markad-standalone.cpp11
-rw-r--r--command/video.cpp2
2 files changed, 11 insertions, 2 deletions
diff --git a/command/markad-standalone.cpp b/command/markad-standalone.cpp
index 0032de4..73524d1 100644
--- a/command/markad-standalone.cpp
+++ b/command/markad-standalone.cpp
@@ -352,7 +352,10 @@ void cMarkAdStandalone::CheckStartStop(int frame, bool checkend)
AddMark(&mark);
free(buf);
}
- int MARKDIFF=(int) (macontext.Video.Info.FramesPerSecond*MAXRANGE);
+
+ int MARKDIFF=length/6;
+ if (MARKDIFF>MAXRANGE) MARKDIFF=MAXRANGE;
+ MARKDIFF=(int) (MARKDIFF*macontext.Video.Info.FramesPerSecond);
#if 0
clMark *before_iStart=marks.GetPrev(iStart,MT_START,0xF);
if (before_iStart)
@@ -1184,6 +1187,12 @@ void cMarkAdStandalone::Process2ndPass()
int frange=macontext.Video.Info.FramesPerSecond*120; // 40s + 80s
int overlap=macontext.Video.Info.FramesPerSecond*10; // 10s
+ if (((p1->type & 0xF0)==MT_ASPECTCHANGE) || (p1->type==0))
+ {
+ dsyslog("ignoring additional overlap");
+ overlap=0;
+ }
+
if (marks.ReadIndex(directory,isTS,p1->position-frange,frange+overlap,&number,&offset,&frame,&iframes))
{
if (!ProcessFile2ndPass(&p1,NULL,number,offset,frame,iframes)) break;
diff --git a/command/video.cpp b/command/video.cpp
index d28e752..0969aad 100644
--- a/command/video.cpp
+++ b/command/video.cpp
@@ -714,7 +714,7 @@ MarkAdPos *cMarkAdOverlap::Process(int FrameNumber, int Frames, bool BeforeAd)
{
if ((lastframenumber>0) && (!similarMaxCnt))
{
- similarCutOff=60000;
+ similarCutOff=50000; // lower is harder!
similarMaxCnt=4;
}