--- freeimage.cpp.old 2023-10-10 17:44:29.522212542 -0300 +++ freeimage.cpp 2023-10-10 17:47:32.768202551 -0300 @@ -209,11 +209,7 @@ #ifdef HAVE_FFMPEG -#ifdef AV_CODEC_CAP_TRUNCATED -#define CAP_TRUNCATED AV_CODEC_CAP_TRUNCATED -#else -#define CAP_TRUNCATED CODEC_CAP_TRUNCATED -#endif +#define CAP_TRUNCATED 0 const char *GfxProviderFreeImage::supportedformatsFfmpeg() { @@ -313,7 +309,7 @@ // Find decoder for video stream AVCodecID codecId = codecParm->codec_id; - auto decoder = avcodec_find_decoder(codecId); + const AVCodec* decoder = avcodec_find_decoder(codecId); if (!decoder) { LOG_warn << "Codec not found: " << codecId; @@ -330,10 +326,6 @@ // Force seeking to key frames formatContext->seek2any = false; - if (decoder->capabilities & CAP_TRUNCATED) - { - codecContext->flags |= CAP_TRUNCATED; - } AVPixelFormat sourcePixelFormat = static_cast(codecParm->format); AVPixelFormat targetPixelFormat = AV_PIX_FMT_BGR24; //raw data expected by freeimage is in this format