Ticket #10793: 20141111-28-commdetector2-fixes.patch

File 20141111-28-commdetector2-fixes.patch, 1.1 KB (added by Mark Spieth, 4 years ago)
  • mythtv/programs/mythcommflag/CommDetector2.cpp

    fixes to make commdetector 2 work
    
    From: Mark Spieth <mspieth@digivation.com.au>
    
    
    ---
     mythtv/programs/mythcommflag/CommDetector2.cpp |    3 ++-
     1 file changed, 2 insertions(+), 1 deletion(-)
    
    diff --git a/mythtv/programs/mythcommflag/CommDetector2.cpp b/mythtv/programs/mythcommflag/CommDetector2.cpp
    index 845e9e9..2a57584 100644
    a b bool CommDetector2::go(void) 
    577577            return false;
    578578        }
    579579
     580        player->DiscardVideoFrame(player->GetRawVideoFrame(60));
    580581        player->DiscardVideoFrame(player->GetRawVideoFrame(0));
    581582        long long nextFrame = -1;
    582583        currentFrameNumber = 0;
    bool CommDetector2::go(void) 
    661662                        .arg((nframes == 0) ? 0 :
    662663                            (int)roundf(currentFrameNumber * 100.0 / nframes))
    663664                        .arg((currentFrameNumber - lastLoggedFrame) * 1000 /
    664                             elapsed));
     665                            ((elapsed>0)?elapsed:1)));
    665666                lastLoggedFrame = currentFrameNumber;
    666667            }
    667668