Rebuild with ffmpeg 8.0

This commit is contained in:
2025-09-16 12:01:57 +03:00
parent 0f1bdd8846
commit 3f3a9b45e6
3 changed files with 61 additions and 13 deletions
+3 -2
View File
@@ -1,10 +1,11 @@
name: gegl
description: Data flow based image processing framework
version: 0.4.62
revision: 2
url: https://www.gegl.org/
license: GPL3-or-later OR LGPL3-or-later
architecture: any
depends: ["babl", "cairo", "gcc-libs", "gdk-pixbuf", "glib", "glibc", "jasper", "json-glib", "lcms2", "lensfun", "libjpeg-turbo", "libpng", "libraw", "librsvg", "libspiro", "libtiff", "libwebp", "luajit", "pango", "poppler"]
optional_depends: ["ffmpeg", "graphviz"]
make_depends: ["gobject-introspection", "meson", "python-pygobject", "vala"]
optional_depends: ["ffmpeg", "graphviz", "sdl2-compat"]
make_depends: ["ffmpeg", "gexiv2", "gobject-introspection", "meson", "python-pygobject", "sdl2-compat","vala"]
type: source
+50
View File
@@ -0,0 +1,50 @@
Submitted By: Rahul Chandra <rahul AT chandra D0T net>
Date: 2025-09-05
Initial Package Version: 0.4.62
Upstream Status: Applied eda8ba51786f197b72265eafcdab407d91ec9c70
Origin: Gnome Gitlab
Description: Fixes building against FFMPEG 8.0
From eda8ba51786f197b72265eafcdab407d91ec9c70 Mon Sep 17 00:00:00 2001
From: Bruno Lopes <[email protected]>
Date: Fri, 5 Sep 2025 19:46:24 -0300
Subject: [PATCH] operations: Support FFMPEG 8 on ff-load
Closes #428
Patch from https://github.com/msys2/MINGW-packages/pull/25335
---
operations/external/ff-load.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/operations/external/ff-load.c b/operations/external/ff-load.c
index a8c266827..babd7f6d6 100644
--- a/operations/external/ff-load.c
+++ b/operations/external/ff-load.c
@@ -349,7 +349,11 @@ decode_frame (GeglOperation *operation,
if (frame < 2 || frame > prevframe + 64 || frame < prevframe )
{
int64_t seek_target = av_rescale_q (((frame) * AV_TIME_BASE * 1.0) / o->frame_rate
+#if LIBAVCODEC_VERSION_MAJOR < 60
, AV_TIME_BASE_Q, p->video_stream->time_base) / p->video_ctx->ticks_per_frame;
+#else
+, AV_TIME_BASE_Q, p->video_stream->time_base) / (p->video_ctx->codec_descriptor->props & AV_CODEC_PROP_FIELDS ? 2 : 1);
+#endif
if (av_seek_frame (p->video_fcontext, p->video_index, seek_target, (AVSEEK_FLAG_BACKWARD )) < 0)
fprintf (stderr, "video seek error!\n");
@@ -403,7 +407,11 @@ decode_frame (GeglOperation *operation,
break;
}
got_picture = 1;
+#if LIBAVUTIL_VERSION_MAJOR < 58
if ((pkt.dts == pkt.pts) || (p->lavc_frame->key_frame!=0))
+#else
+ if ((pkt.dts == pkt.pts) || (p->lavc_frame->flags & AV_FRAME_FLAG_KEY))
+#endif
{
// cur_dts and first_dts are moved to libavformat/internal.h
/*
--
GitLab
+8 -11
View File
@@ -10,33 +10,30 @@ FILENAME="${DOWNLOAD##*/}"
prepare() {
wget "$DOWNLOAD"
tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE"
cd "$BPM_SOURCE"
patch -Np1 -i "$BPM_WORKDIR"/ffmpeg8-fix.patch
}
# The build function is executed in the source directory
# This function is used to compile the source code
build() {
mkdir build
cd build
meson setup --prefix=/usr --buildtype=release ..
meson compile
meson setup --prefix=/usr --buildtype=release -Dworkshop=true -Dmrg=disabled -Dmaxflow=disabled build
meson compile -C build
}
# The check function is executed in the source directory
# This function is used to run tests to verify the package has been compiled correctly
check() {
cd build
# Bypass gegl:ff-load-save test suite due to incompatibilities with recent ffmpeg version
meson test --no-suite "gegl:ff-load-save"
meson test -C build --no-suite "gegl:ff-load-save" --print-errorlogs
}
# The package function is executed in the source directory
# This function is used to move the compiled files into the output directory
package() {
cd build
meson install --destdir="$BPM_OUTPUT"
meson install -C build --destdir="$BPM_OUTPUT"
# Install package license
install -Dm644 "$BPM_SOURCE"/COPYING -t "$BPM_OUTPUT"/usr/share/licenses/gegl/
}