Skip to content

Commit

Permalink
Convert QDataTime::secsTo() to compile in both Qt4 and Qt5.
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-kristjansson authored and jyavenard committed Mar 8, 2013
1 parent ce82052 commit 3886b6a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions mythtv/programs/mythcommflag/ClassicCommDetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,10 @@ void ClassicCommDetector::Init()
height = video_disp_dim.height();
fps = player->GetFrameRate();

preRoll = (long long)(max(0,recordingStartedAt.secsTo(startedAt)) * fps);
postRoll = (long long)(max(0,stopsAt.secsTo(recordingStopsAt)) * fps);
preRoll = (long long)(
max(int64_t(0), int64_t(recordingStartedAt.secsTo(startedAt))) * fps);
postRoll = (long long)(
max(int64_t(0), int64_t(stopsAt.secsTo(recordingStopsAt))) * fps);

#ifdef SHOW_DEBUG_WIN
comm_debug_init(width, height);
Expand Down Expand Up @@ -319,7 +321,8 @@ bool ClassicCommDetector::go()
logoDetector = new ClassicLogoDetector(this, width, height,
commDetectBorder, horizSpacing, vertSpacing);

requiredHeadStart += max(0,recordingStartedAt.secsTo(startedAt));
requiredHeadStart += max(
int64_t(0), int64_t(recordingStartedAt.secsTo(startedAt)));
requiredHeadStart += logoDetector->getRequiredAvailableBufferForSearch();

emit statusUpdate(QCoreApplication::translate("(mythcommflag)",
Expand Down

0 comments on commit 3886b6a

Please sign in to comment.