summarylogtreecommitdiffstats
path: root/fix-ffmpeg-compile.patch
blob: 9dd9b40712717a11e70a2de51971de81aa7c9976 (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
--- a/src/gfx/freeimage.cpp	2023-03-03 22:13:58.000000000 +0000
+++ b/src/gfx/freeimage.cpp	2023-03-14 10:03:10.950216675 +0000
@@ -212,7 +212,7 @@
 #ifdef AV_CODEC_CAP_TRUNCATED
 #define CAP_TRUNCATED AV_CODEC_CAP_TRUNCATED
 #else
-#define CAP_TRUNCATED CODEC_CAP_TRUNCATED
+#define CAP_TRUNCATED 0
 #endif
 
 const char *GfxProviderFreeImage::supportedformatsFfmpeg()
@@ -313,7 +313,7 @@
 
     // Find decoder for video stream
     AVCodecID codecId = codecParm->codec_id;
-    AVCodec* decoder = avcodec_find_decoder(codecId);
+    auto decoder = avcodec_find_decoder(codecId);
     if (!decoder)
     {
         LOG_warn << "Codec not found: " << codecId;
@@ -330,7 +330,6 @@
 
     // Force seeking to key frames
     formatContext->seek2any = false;
-    videoStream->skip_to_keyframe = true;
     if (decoder->capabilities & CAP_TRUNCATED)
     {
         codecContext->flags |= CAP_TRUNCATED;