Skip to content
Snippets Groups Projects
Verified Commit 1315a01c authored by Silas Della Contrada's avatar Silas Della Contrada
Browse files

Fixed error with ffmpeg versions prior 5.0

parent 33f027b0
No related branches found
No related tags found
1 merge request!17Draft: Resolve "Migrate frame passing to libProcessingGraph"
......@@ -55,7 +55,11 @@ namespace AVQt {
}
AVFormatContext *formatContext = avformat_alloc_context();
#if LIBAVFORMAT_VERSION_MAJOR >= 59
int ret = avformat_alloc_output_context2(&formatContext, pOutputFormat, config.containerFormat, nullptr);
#else
int ret = avformat_alloc_output_context2(&formatContext, const_cast<AVOutputFormat *>(pOutputFormat), config.containerFormat, nullptr);
#endif
if (ret < 0) {
char strBuf[AV_ERROR_MAX_STRING_SIZE];
qWarning() << "[Muxer] Could not allocate output context: " << av_make_error_string(strBuf, AV_ERROR_MAX_STRING_SIZE, ret);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment