--- a/sdk/src/gfx/freeimage.cpp +++ b/sdk/src/gfx/freeimage.cpp @@ -216,11 +216,13 @@ bool GfxProviderFreeImage::readbitmapFreeimage(const LocalPath& imagePath, int s #ifdef HAVE_FFMPEG +#if LIBAVCODEC_VERSION_MAJOR < 60 #ifdef AV_CODEC_CAP_TRUNCATED #define CAP_TRUNCATED AV_CODEC_CAP_TRUNCATED #else #define CAP_TRUNCATED CODEC_CAP_TRUNCATED #endif +#endif const char *GfxProviderFreeImage::supportedformatsFfmpeg() { @@ -323,10 +325,12 @@ bool GfxProviderFreeImage::readbitmapFfmpeg(const LocalPath& imagePath, int size // Force seeking to key frames formatContext->seek2any = false; +#if LIBAVCODEC_VERSION_MAJOR < 60 if (decoder->capabilities & CAP_TRUNCATED) { codecContext->flags |= CAP_TRUNCATED; } +#endif AVPixelFormat sourcePixelFormat = static_cast(codecParm->format); AVPixelFormat targetPixelFormat = AV_PIX_FMT_BGR24; //raw data expected by freeimage is in this format