Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- AVFormatContext* OpenOutputFile(const std::string& filepath) {
- AVFormatContext* format_context = nullptr;
- avformat_alloc_output_context2(&format_context, nullptr, nullptr, filepath.c_str());
- if ((format_context->oformat->flags & AVFMT_NOFILE) == 0) {
- avio_open(&format_context->pb, filepath.c_str(), AVIO_FLAG_WRITE);
- }
- return fc_raw_ptr;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement