nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 29 lines 961 B view raw
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 4 5 #ifdef HAVE_FFMPEG 6 7+#if LIBAVCODEC_VERSION_MAJOR < 60 8 #ifdef AV_CODEC_CAP_TRUNCATED 9 #define CAP_TRUNCATED AV_CODEC_CAP_TRUNCATED 10 #else 11 #define CAP_TRUNCATED CODEC_CAP_TRUNCATED 12 #endif 13+#endif 14 15 const char *GfxProviderFreeImage::supportedformatsFfmpeg() 16 { 17@@ -323,10 +325,12 @@ bool GfxProviderFreeImage::readbitmapFfmpeg(const LocalPath& imagePath, int size 18 19 // Force seeking to key frames 20 formatContext->seek2any = false; 21+#if LIBAVCODEC_VERSION_MAJOR < 60 22 if (decoder->capabilities & CAP_TRUNCATED) 23 { 24 codecContext->flags |= CAP_TRUNCATED; 25 } 26+#endif 27 28 AVPixelFormat sourcePixelFormat = static_cast<AVPixelFormat>(codecParm->format); 29 AVPixelFormat targetPixelFormat = AV_PIX_FMT_BGR24; //raw data expected by freeimage is in this format