summarylogtreecommitdiffstats
path: root/ffmpeg6.diff
blob: d20ebd5345710543664a9eaaaa0d9836eb7b6cc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--- a/src/gfx/freeimage.cpp
+++ b/src/gfx/freeimage.cpp
@@ -209,11 +209,13 @@ bool GfxProviderFreeImage::readbitmapFre

 #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()
 {
@@ -331,10 +333,12 @@ bool GfxProviderFreeImage::readbitmapFfm

     // 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<AVPixelFormat>(codecParm->format);
     AVPixelFormat targetPixelFormat = AV_PIX_FMT_BGR24; //raw data expected by freeimage is in this format