1 --- a/sdk/src/gfx/freeimage.cpp
2 +++ b/sdk/src/gfx/freeimage.cpp
3 @@ -216,11 +216,13 @@ bool GfxProviderFreeImage::readbitmapFreeimage(const LocalPath& imagePath, int s
7 +#if LIBAVCODEC_VERSION_MAJOR < 60
8 #ifdef AV_CODEC_CAP_TRUNCATED
9 #define CAP_TRUNCATED AV_CODEC_CAP_TRUNCATED
11 #define CAP_TRUNCATED CODEC_CAP_TRUNCATED
15 const char *GfxProviderFreeImage::supportedformatsFfmpeg()
17 @@ -323,10 +325,12 @@ bool GfxProviderFreeImage::readbitmapFfmpeg(const LocalPath& imagePath, int size
19 // Force seeking to key frames
20 formatContext->seek2any = false;
21 +#if LIBAVCODEC_VERSION_MAJOR < 60
22 if (decoder->capabilities & CAP_TRUNCATED)
24 codecContext->flags |= CAP_TRUNCATED;
28 AVPixelFormat sourcePixelFormat = static_cast<AVPixelFormat>(codecParm->format);
29 AVPixelFormat targetPixelFormat = AV_PIX_FMT_BGR24; //raw data expected by freeimage is in this format