Browse Source

network/MEGAsync: Updated for version 4.9.1.0.

Patched for ffmpeg 6.x

Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
MEGAsync
JW(Shinichi Abe) 2 years ago
committed by Matteo Bernardini
parent
commit
6989cf48ee
  1. 6
      network/MEGAsync/MEGAsync.SlackBuild
  2. 10
      network/MEGAsync/MEGAsync.info
  3. 24
      network/MEGAsync/megasync-4.5.0.0_ffmpeg.patch
  4. 40
      network/MEGAsync/megasync-4.9.1.0_ffmpeg6.patch

6
network/MEGAsync/MEGAsync.SlackBuild

@ -26,8 +26,8 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=MEGAsync
VERSION=${VERSION:-4.5.3.0}
SDK=${SDK:-3.8.2c}
VERSION=${VERSION:-4.9.1.0}
SDK=${SDK:-4.16.0c}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -83,7 +83,7 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
patch -p1 < $CWD/megasync-4.5.0.0_ffmpeg.patch
patch -p1 < $CWD/megasync-4.9.1.0_ffmpeg6.patch
cd src/MEGASync/mega
patch -p1 < $CWD/megasync-4.5.0.0_pdfium.patch

10
network/MEGAsync/MEGAsync.info

@ -1,10 +1,10 @@
PRGNAM="MEGAsync"
VERSION="4.5.3.0"
VERSION="4.9.1.0"
HOMEPAGE="https://github.com/meganz/MEGAsync/"
DOWNLOAD="https://github.com/meganz/MEGAsync/archive/v4.5.3.0_Linux/MEGAsync-4.5.3.0_Linux.tar.gz \
https://github.com/meganz/sdk/archive/v3.8.2c/sdk-3.8.2c.tar.gz"
MD5SUM="be0f1e070b6990c19d766990758ef997 \
ded79c86d1ddbe2572f0562fa1dc15fc"
DOWNLOAD="https://github.com/meganz/MEGAsync/archive/v4.9.1.0_Linux/MEGAsync-4.9.1.0_Linux.tar.gz \
https://github.com/meganz/sdk/archive/v4.16.0c/sdk-4.16.0c.tar.gz"
MD5SUM="be9fca6eee9bad9de2f8999bec51ccbb \
b8c50f486602b2a8af4866d098cae303"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="FreeImage libmediainfo"

24
network/MEGAsync/megasync-4.5.0.0_ffmpeg.patch

@ -1,24 +0,0 @@
diff -Naur a/src/MEGASync/mega/src/gfx/freeimage.cpp b/src/MEGASync/mega/src/gfx/freeimage.cpp
--- a/src/MEGASync/mega/src/gfx/freeimage.cpp 2021-05-23 02:28:08.694081111 +0100
+++ b/src/MEGASync/mega/src/gfx/freeimage.cpp 2021-05-23 02:29:56.189964969 +0100
@@ -188,7 +188,7 @@
// Force seeking to key frames
formatContext->seek2any = false;
- videoStream->skip_to_keyframe = true;
+ //videoStream->skip_to_keyframe = true;
if (decoder->capabilities & CAP_TRUNCATED)
{
codecContext.flags |= CAP_TRUNCATED;
diff -Naur a/src/MEGASync/mega/src/gfx/qt.cpp b/src/MEGASync/mega/src/gfx/qt.cpp
--- a/src/MEGASync/mega/src/gfx/qt.cpp 2021-05-23 02:28:08.694081111 +0100
+++ b/src/MEGASync/mega/src/gfx/qt.cpp 2021-05-23 02:29:36.172545153 +0100
@@ -1209,7 +1209,7 @@
// Force seeking to key frames
formatContext->seek2any = false;
- videoStream->skip_to_keyframe = true;
+ //videoStream->skip_to_keyframe = true;
if (decoder->capabilities & CAP_TRUNCATED)
{
codecContext.flags |= CAP_TRUNCATED;

40
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
Loading…
Cancel
Save