return frame;
}
+std::shared_ptr<AVFrame> flush()
+{
+ static std::shared_ptr<AVFrame> dummy(av_frame_alloc(), [](AVFrame* p)
+ {
+ av_frame_free(&p);
+ });
+
+ return dummy;
+}
+
spl::shared_ptr<AVCodecContext> open_codec(AVFormatContext& context, enum AVMediaType type, int& index, bool single_threaded)
{
AVCodec* decoder;
buf.push_back(*file_it);
if(buf.empty())
- return nullptr;
+ return false;
pb.buf = buf.data();
pb.buf_size = static_cast<int>(buf.size());