2020-06-09 Fred Gleason <fredg@paravelsystems.com>

* Fixed a cast overflow bug in rdairplay(1) that cause incorrect
	pie timer indications after adding or deleting events to a running
	log.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2020-06-09 09:00:48 -04:00
parent aed6e5b6bc
commit bfab34e478
2 changed files with 11 additions and 5 deletions

View File

@@ -1724,16 +1724,18 @@ void MainWidget::transportChangedData()
case RDAirPlayConf::CartTransition:
if((next_logline=air_log[0]->
logLine(air_log[0]->nextLine(line)))!=NULL) {
if((unsigned)logline->startTime(RDLogLine::Actual).
//
// Are we not past the segue point?
//
if((logline->playPosition()>
(unsigned)logline->segueLength(next_logline->transType()))||
((unsigned)logline->startTime(RDLogLine::Actual).
msecsTo(QTime::currentTime())<
logline->segueLength(next_logline->transType())-
logline->playPosition()) {
logline->playPosition())) {
air_pie_counter->
setTime(logline->segueLength(next_logline->transType()));
}
else {
air_pie_counter->setTime(logline->effectiveLength());
}
}
else {
air_pie_counter->setTime(logline->effectiveLength());