diff --git a/testing/py3-imageio-ffmpeg/0001-Add-a-null-filter-to-re-enable-frame-count.patch b/testing/py3-imageio-ffmpeg/0001-Add-a-null-filter-to-re-enable-frame-count.patch new file mode 100644 index 000000000000..6f4e5e3fee90 --- /dev/null +++ b/testing/py3-imageio-ffmpeg/0001-Add-a-null-filter-to-re-enable-frame-count.patch @@ -0,0 +1,43 @@ +From 241715fa915d944ffa8301e9da0474c2a0e511e7 Mon Sep 17 00:00:00 2001 +From: Wenlong Zhang +Date: Thu, 4 Jul 2024 08:40:57 +0000 +Subject: [PATCH] Add a null filter to re-enable frame count + +backport upstream patch: https://github.com/imageio/imageio-ffmpeg/pull/107 + +--- + imageio_ffmpeg/_io.py | 4 ++-- + tests/test_io.py | 2 +- + 2 files changed, 3 insertions(+), 3 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/tests/test_io.py b/tests/test_io.py +index bb14869..6d18d60 100644 +--- a/tests/test_io.py ++++ b/tests/test_io.py +@@ -40,7 +40,7 @@ def test_ffmpeg_version(): + def test_read_nframes(): + nframes, nsecs = imageio_ffmpeg.count_frames_and_secs(test_file1) + assert nframes == 280 +- assert 13.80 < nsecs < 13.99 ++ assert 13.80 < nsecs < 14.00 + + + def test_read_frames_resource_warning(): +-- +2.45.2 + diff --git a/testing/py3-imageio-ffmpeg/APKBUILD b/testing/py3-imageio-ffmpeg/APKBUILD index 9546859a5252..5abad8702793 100644 --- a/testing/py3-imageio-ffmpeg/APKBUILD +++ b/testing/py3-imageio-ffmpeg/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Antoni Aloy pkgname=py3-imageio-ffmpeg pkgver=0.4.9 -pkgrel=0 +pkgrel=1 pkgdesc="FFMPEG wrapper for Python" url="https://github.com/imageio/imageio-ffmpeg" arch="noarch" @@ -10,7 +10,8 @@ depends="ffmpeg python3 py3-setuptools" makedepends="py3-gpep517 py3-setuptools py3-wheel" checkdepends="py3-psutil py3-pytest" subpackages="$pkgname-pyc" -source="$pkgname-$pkgver.tar.gz::https://github.com/imageio/imageio-ffmpeg/archive/v$pkgver.tar.gz" +source="$pkgname-$pkgver.tar.gz::https://github.com/imageio/imageio-ffmpeg/archive/v$pkgver.tar.gz + 0001-Add-a-null-filter-to-re-enable-frame-count.patch" builddir="$srcdir/imageio-ffmpeg-$pkgver" build() { @@ -41,4 +42,5 @@ package() { sha512sums=" ebf63b9ac9c733d4c12d3aa4c6a9e81dd0128795a040e65df03bfae00e3562a3976eaa2f4058562bbddc3f8d63d6bf2a38133de4d2ddb0d2dc62ffab2449e143 py3-imageio-ffmpeg-0.4.9.tar.gz +0f6bdffc68c802573b934366f565637b33aa00e9c7f68c2ec130122be5fc6ac11a674c3bccb97caa396df0edc028b59fdf87ddd79ec640593d11fdf6b4f95ec9 0001-Add-a-null-filter-to-re-enable-frame-count.patch "