summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO2
-rwxr-xr-xPKGBUILD2
-rw-r--r--ffmpeg.patch34
3 files changed, 28 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index cffd10e885aa..2ceb20e59ce9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -30,6 +30,6 @@ pkgbase = megasync-nopdfium
source = ffmpeg.patch
sha256sums = SKIP
sha256sums = SKIP
- sha256sums = bc8a8460c967d084e2643431dbb06c03897f1944a0e899318fc78b611f9255e6
+ sha256sums = d5fcd4018a665e7a591ab796569777cf0a74fadc7c953f6879f37c949f82e7ae
pkgname = megasync-nopdfium
diff --git a/PKGBUILD b/PKGBUILD
index d646d12a5758..bb0495412ff4 100755
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -26,7 +26,7 @@ source=("git+https://github.com/meganz/MEGAsync.git#tag=v${pkgver}${_extname}"
"ffmpeg.patch")
sha256sums=('SKIP'
'SKIP'
- 'bc8a8460c967d084e2643431dbb06c03897f1944a0e899318fc78b611f9255e6')
+ 'd5fcd4018a665e7a591ab796569777cf0a74fadc7c953f6879f37c949f82e7ae')
prepare() {
cd "MEGAsync"
diff --git a/ffmpeg.patch b/ffmpeg.patch
index 036547f11ca5..9a1af1458e29 100644
--- a/ffmpeg.patch
+++ b/ffmpeg.patch
@@ -1,7 +1,21 @@
-diff --unified --recursive --text v4.6.2.0/src/gfx/freeimage.cpp v4.6.3.0/src/gfx/freeimage.cpp
---- v4.6.2.0/src/gfx/freeimage.cpp 2022-02-05 23:51:36.555355000 +0800
-+++ v4.6.3.0/src/gfx/freeimage.cpp 2022-02-06 00:21:20.888555180 +0800
-@@ -240,7 +240,7 @@
+diff --git a/src/gfx/freeimage.cpp b/src/gfx/freeimage.cpp
+index 2f685279a..e4b0a8c4a 100644
+--- a/src/gfx/freeimage.cpp
++++ b/src/gfx/freeimage.cpp
+@@ -209,12 +209,6 @@ bool GfxProviderFreeImage::readbitmapFreeimage(FileSystemAccess*, const LocalPat
+
+ #ifdef HAVE_FFMPEG
+
+-#ifdef AV_CODEC_CAP_TRUNCATED
+-#define CAP_TRUNCATED AV_CODEC_CAP_TRUNCATED
+-#else
+-#define CAP_TRUNCATED CODEC_CAP_TRUNCATED
+-#endif
+-
+ const char *GfxProviderFreeImage::supportedformatsFfmpeg()
+ {
+ return ".264.265.3g2.3gp.3gpa.3gpp.3gpp2.mp3"
+@@ -313,7 +307,7 @@ bool GfxProviderFreeImage::readbitmapFfmpeg(FileSystemAccess* fa, const LocalPat
// Find decoder for video stream
AVCodecID codecId = codecParm->codec_id;
@@ -10,11 +24,15 @@ diff --unified --recursive --text v4.6.2.0/src/gfx/freeimage.cpp v4.6.3.0/src/gf
if (!decoder)
{
LOG_warn << "Codec not found: " << codecId;
-@@ -257,7 +257,6 @@
+@@ -330,11 +324,6 @@ bool GfxProviderFreeImage::readbitmapFfmpeg(FileSystemAccess* fa, const LocalPat
// Force seeking to key frames
formatContext->seek2any = false;
- videoStream->skip_to_keyframe = true;
- if (decoder->capabilities & CAP_TRUNCATED)
- {
- codecContext->flags |= CAP_TRUNCATED;
+- if (decoder->capabilities & CAP_TRUNCATED)
+- {
+- codecContext->flags |= CAP_TRUNCATED;
+- }
+
+ AVPixelFormat sourcePixelFormat = static_cast<AVPixelFormat>(codecParm->format);
+ AVPixelFormat targetPixelFormat = AV_PIX_FMT_BGR24; //raw data expected by freeimage is in this format