Permalink
Browse files

Don't call _cycle_timer.elapsed() unless timer is running.

We're depending on the value returned being 0 until the timer is
started. This code will work as intended, but it makes debugging
places where elapsed() is unintentionally called before start()
more difficult so I've added and isRunning() call.
  • Loading branch information...
daniel-kristjansson committed Jan 30, 2013
1 parent 96de301 commit 95b39ff87da56488e62d3046f5921a7a912c06b8
Showing with 1 addition and 1 deletion.
  1. +1 −1 mythtv/libs/libmythtv/recorders/streamhandler.cpp
@@ -356,7 +356,7 @@ bool StreamHandler::UpdateFiltersFromStreamData(void)
ok &= AddPIDFilter(*ait);
// Cycle filters if it's been a while
if (_cycle_timer.elapsed() > 1000)
if (_cycle_timer.isRunning() && (_cycle_timer.elapsed() > 1000))
CycleFiltersByPriority();
return ok;

0 comments on commit 95b39ff

Please sign in to comment.