commit:     880705050a56337a151893346e64cf7031474eab
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Mar  7 15:29:48 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Mar  7 15:39:06 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=88070505

dev-python/imageio-ffmpeg: Add a patch for ffmpeg-6 compat

Bug: https://github.com/imageio/imageio-ffmpeg/issues/99
Pull-Request: https://github.com/imageio/imageio-ffmpeg/pull/107
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../files/imageio-ffmpeg-0.4.9-ffmpeg-6.patch      | 25 ++++++++++++++++++++++
 ...0.4.9.ebuild => imageio-ffmpeg-0.4.9-r1.ebuild} |  7 +++++-
 2 files changed, 31 insertions(+), 1 deletion(-)

diff --git 
a/dev-python/imageio-ffmpeg/files/imageio-ffmpeg-0.4.9-ffmpeg-6.patch 
b/dev-python/imageio-ffmpeg/files/imageio-ffmpeg-0.4.9-ffmpeg-6.patch
new file mode 100644
index 000000000000..196c21523426
--- /dev/null
+++ b/dev-python/imageio-ffmpeg/files/imageio-ffmpeg-0.4.9-ffmpeg-6.patch
@@ -0,0 +1,25 @@
+From e2ec5ea3b7d9e5fd3225a05891f3611e29adbd1d Mon Sep 17 00:00:00 2001
+From: Tom Vercauteren <tom.vercaute...@kcl.ac.uk>
+Date: Thu, 7 Mar 2024 14:28:21 +0000
+Subject: [PATCH] Add a null filter to re-enable frame count
+
+This aims at addressing https://github.com/imageio/imageio-ffmpeg/issues/99
+---
+ imageio_ffmpeg/_io.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/imageio_ffmpeg/_io.py b/imageio_ffmpeg/_io.py
+index b85c453..faf1ee8 100644
+--- a/imageio_ffmpeg/_io.py
++++ b/imageio_ffmpeg/_io.py
+@@ -153,8 +153,8 @@ def count_frames_and_secs(path):
+         path,
+         "-map",
+         "0:v:0",
+-        "-c",
+-        "copy",
++        "-vf",
++        "null",
+         "-f",
+         "null",
+         "-",

diff --git a/dev-python/imageio-ffmpeg/imageio-ffmpeg-0.4.9.ebuild 
b/dev-python/imageio-ffmpeg/imageio-ffmpeg-0.4.9-r1.ebuild
similarity index 81%
rename from dev-python/imageio-ffmpeg/imageio-ffmpeg-0.4.9.ebuild
rename to dev-python/imageio-ffmpeg/imageio-ffmpeg-0.4.9-r1.ebuild
index caabdf39b65d..71869a870c23 100644
--- a/dev-python/imageio-ffmpeg/imageio-ffmpeg-0.4.9.ebuild
+++ b/dev-python/imageio-ffmpeg/imageio-ffmpeg-0.4.9-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2021-2023 Gentoo Authors
+# Copyright 2021-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -30,3 +30,8 @@ RDEPEND="
 "
 
 distutils_enable_tests pytest
+
+PATCHES=(
+       # https://github.com/imageio/imageio-ffmpeg/pull/107
+       "${FILESDIR}/${P}-ffmpeg-6.patch"
+)

Reply via email to