tbb::atomic<uint32_t> start_; \r
tbb::atomic<uint32_t> length_;\r
tbb::atomic<bool> loop_;\r
+ tbb::atomic<bool> eof_;\r
double fps_;\r
uint32_t frame_number_;\r
\r
start_ = start;\r
length_ = length;\r
loop_ = loop;\r
+ eof_ = false;\r
seek_target_ = start_;\r
is_running_ = true;\r
thread_ = boost::thread([this]{run();});\r
seek_target_ = target;\r
video_stream_.clear();\r
audio_stream_.clear();\r
+\r
+ eof_ = false;\r
+ cond_.notify_one();\r
}\r
\r
std::wstring print() const\r
internal_seek(start_);\r
graph_->set_tag("seek"); \r
}\r
+ else\r
+ eof_ = true;\r
}\r
else\r
{ \r
\r
boost::this_thread::sleep(boost::posix_time::milliseconds(1));\r
\r
- while(full() && is_running_)\r
+ while((full() || eof_) && is_running_)\r
cond_.wait(lock);\r
}\r
catch(...)\r