if(packet->data == nullptr)\r
{\r
packets_.pop();\r
- file_frame_number_ = static_cast<uint32_t>(packet->pts);\r
avcodec_flush_buffers(codec_context_.get());\r
return flush_audio();\r
}\r
\r
bool ready() const\r
{\r
- return !codec_context_ || !packets_.empty();\r
+ return !packets_.empty();\r
}\r
\r
void clear()\r
auto flush_packet = create_packet();\r
flush_packet->data = nullptr;\r
flush_packet->size = 0;\r
- flush_packet->pts = target;\r
-\r
buffer_.push(flush_packet);\r
\r
tick();\r
}, task_priority::high_priority);\r
}\r
- \r
+ \r
std::wstring print() const\r
{\r
return L"ffmpeg_input[" + filename_ + L")]";\r
CASPAR_LOG(trace) << print() << " Looping."; \r
}\r
else\r
+ {\r
+ auto flush_packet = create_packet();\r
+ flush_packet->data = nullptr;\r
+ flush_packet->size = 0;\r
+ buffer_.push(flush_packet);\r
+\r
eof_ = true;\r
+ }\r
}\r
else\r
{ \r
}\r
\r
packets_.pop();\r
- file_frame_number_ = static_cast<uint32_t>(packet->pts);\r
- avcodec_flush_buffers(codec_context_.get());\r
- \r
+ avcodec_flush_buffers(codec_context_.get()); \r
return flush_video(); \r
}\r
\r
\r
bool ready() const\r
{\r
- return !codec_context_ || !packets_.empty();\r
+ return !packets_.empty();\r
}\r
\r
void clear()\r