, _log (log)
, _prepare_work (new boost::asio::io_service::work (_prepare_service))
, _pending_seek_accurate (false)
- , _suspended (false)
+ , _suspended (0)
, _finished (false)
, _died (false)
, _stop_thread (false)
boost::mutex::scoped_lock lm (_mutex);
if (type == CHANGE_TYPE_PENDING) {
- _suspended = true;
+ ++_suspended;
} else if (type == CHANGE_TYPE_DONE) {
-
+ --_suspended;
if (_died || _pending_seek_position || frequent) {
return;
}
}
seek_unlocked (seek_to, true);
- _suspended = false;
_awaiting = seek_to;
+ } else if (type == CHANGE_TYPE_CANCELLED) {
+ --_suspended;
}
}
boost::condition _arrived;
boost::optional<DCPTime> _pending_seek_position;
bool _pending_seek_accurate;
- bool _suspended;
+ int _suspended;
bool _finished;
bool _died;
bool _stop_thread;