\r
bool full() const\r
{\r
- return is_running_ && buffer_size_ > MAX_BUFFER_SIZE && buffer_.size() > MAX_BUFFER_COUNT;\r
+ return is_running_ && (buffer_size_ > MAX_BUFFER_SIZE || buffer_.size() > MAX_BUFFER_COUNT);\r
}\r
\r
void seek_frame(int64_t frame, int flags = 0)\r
bool is_eof(int ret)\r
{\r
if(ret == AVERROR(EIO))\r
- CASPAR_LOG(debug) << print() << " Received EIO, assuming EOF.";\r
- //if(ret == AVERROR_EOF)\r
- // CASPAR_LOG(info) << print() << " Received EOF.";\r
+ CASPAR_LOG(debug) << print() << " Received EIO, assuming EOF. " << nb_frames_;\r
+ if(ret == AVERROR_EOF)\r
+ CASPAR_LOG(info) << print() << " Received EOF. " << nb_frames_;\r
\r
- return ret == AVERROR_EOF || ret == AVERROR(EIO); // av_read_frame doesn't always correctly return AVERROR_EOF;\r
+ return nb_frames_ > 0 && (ret == AVERROR_EOF || ret == AVERROR(EIO)); // av_read_frame doesn't always correctly return AVERROR_EOF;\r
}\r
\r
std::wstring print() const\r