diff options
-rw-r--r-- | command/markad-standalone.cpp | 2 | ||||
-rw-r--r-- | command/video.cpp | 10 | ||||
-rw-r--r-- | command/video.h | 2 |
3 files changed, 9 insertions, 5 deletions
diff --git a/command/markad-standalone.cpp b/command/markad-standalone.cpp index 577fd78..f7abde9 100644 --- a/command/markad-standalone.cpp +++ b/command/markad-standalone.cpp @@ -691,7 +691,7 @@ bool cMarkAdStandalone::ProcessFile2ndPass(clMark **Mark1, clMark **Mark2,int Nu { if ((actframe-iframe)<=3) { - if (pn>mSTART) pos=video->Process2ndPass(lastiframe,Frames,(pn==mBEFORE)); + if (pn>mSTART) pos=video->ProcessOverlap(lastiframe,Frames,(pn==mBEFORE)); //SaveFrame(lastiframe); framecounter++; } diff --git a/command/video.cpp b/command/video.cpp index d896847..6f7081b 100644 --- a/command/video.cpp +++ b/command/video.cpp @@ -675,8 +675,12 @@ MarkAdPos *cMarkAdOverlap::Detect() if (simcnt>similarMaxCnt) { - result.FrameNumberBefore=histbuf[OV_BEFORE][tmpB].framenumber; - result.FrameNumberAfter=histbuf[OV_AFTER][tmpA].framenumber; + if ((histbuf[OV_BEFORE][tmpB].framenumber>result.FrameNumberBefore) && + (histbuf[OV_AFTER][tmpA].framenumber>result.FrameNumberAfter)) + { + result.FrameNumberBefore=histbuf[OV_BEFORE][tmpB].framenumber; + result.FrameNumberAfter=histbuf[OV_AFTER][tmpA].framenumber; + } } else { @@ -827,7 +831,7 @@ bool cMarkAdVideo::aspectratiochange(MarkAdAspectRatio &a, MarkAdAspectRatio &b, } -MarkAdPos *cMarkAdVideo::Process2ndPass(int FrameNumber, int Frames, bool BeforeAd) +MarkAdPos *cMarkAdVideo::ProcessOverlap(int FrameNumber, int Frames, bool BeforeAd) { if (!FrameNumber) return NULL; if (!overlap) overlap=new cMarkAdOverlap(macontext); diff --git a/command/video.h b/command/video.h index bee7d29..447d3ec 100644 --- a/command/video.h +++ b/command/video.h @@ -176,7 +176,7 @@ private: public: cMarkAdVideo(MarkAdContext *maContext); ~cMarkAdVideo(); - MarkAdPos *Process2ndPass(int FrameNumber, int Frames, bool BeforeAd); + MarkAdPos *ProcessOverlap(int FrameNumber, int Frames, bool BeforeAd); MarkAdMarks *Process(int FrameNumber, int FrameNumberNext); void Clear(); }; |