: foreground_(frame_producer::empty())\r
, background_(frame_producer::empty())\r
, frame_number_(0)\r
- , auto_play_delta_(std::numeric_limits<int>::min())\r
+ , auto_play_delta_(-1)\r
, is_paused_(false)\r
{\r
}\r
foreground_ = background_;\r
background_ = frame_producer::empty();\r
frame_number_ = 0;\r
- auto_play_delta_ = std::numeric_limits<int>::min(); \r
+ auto_play_delta_ = -1; \r
}\r
\r
is_paused_ = false;\r
foreground_ = frame_producer::empty();\r
background_ = background_;\r
frame_number_ = 0;\r
- auto_play_delta_ = std::numeric_limits<int>::min();\r
+ auto_play_delta_ = -1;\r
\r
is_paused_ = true;\r
}\r
return foreground_->last_frame();\r
\r
auto frames_left = foreground_->nb_frames() - (++frame_number_) - auto_play_delta_;\r
- if(frames_left < 1)\r
+ if(auto_play_delta_ > -1 && frames_left < 1)\r
{\r
play();\r
return receive();\r
virtual int64_t nb_frames() const \r
{\r
if(loop_)\r
- return std::numeric_limits<int>::max();\r
+ return std::numeric_limits<int64_t>::max();\r
\r
// This function estimates nb_frames until input has read all packets for one loop, at which point the count should be accurate.\r
\r