diff options
Diffstat (limited to 'network/MEGAsync/megasync-4.9.1.0_ffmpeg6.patch')
-rw-r--r-- | network/MEGAsync/megasync-4.9.1.0_ffmpeg6.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/network/MEGAsync/megasync-4.9.1.0_ffmpeg6.patch b/network/MEGAsync/megasync-4.9.1.0_ffmpeg6.patch new file mode 100644 index 0000000000..f42c30d922 --- /dev/null +++ b/network/MEGAsync/megasync-4.9.1.0_ffmpeg6.patch @@ -0,0 +1,40 @@ +--- a/src/MEGASync/mega/src/gfx/freeimage.cpp 2024-02-05 12:31:08.907475460 +0900 ++++ b/src/MEGASync/mega/src/gfx/freeimage.cpp 2024-02-05 13:38:52.356174823 +0900 +@@ -209,11 +209,13 @@ + + #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() + { +@@ -313,7 +315,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,11 +332,13 @@ + + // Force seeking to key frames + formatContext->seek2any = false; +- videoStream->skip_to_keyframe = true; ++ //videoStream->skip_to_keyframe = true; ++ #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 |