From c4b83c249b5ac673164092333f1ae4fd0ab7e854 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Wed, 31 Aug 2022 12:17:14 +0200
Subject: [PATCH] Ignore unpaper warnings from ffmpeg-5.1
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
After upgrading ffmpeg from 5.0.1 to 5.1, t/351_unpaper.t started
failing:
$ xvfb-run -d /usr/bin/perl -Ilib t/351_unpaper.t
1..7
ok 1 - Resolution of imported image
2022/08/31 12:30:01 [image2 @ 0x5608901ecbc0] Encoder did not produce proper pts, making some up.
[image2 @ 0x5608901ecbc0] The specified filename '/tmp/DSK7RSEpdU/1RTuwFulfv.pnm' does not contain an image sequence pattern or a pattern is invalid.
[image2 @ 0x5608901ecbc0] Use a pattern such as %03d for an image sequence or use the -update option (with -frames:v 1 if needed) to write a single image.
not ok 2 - no warnings
# Failed test 'no warnings'
# at t/351_unpaper.t line 91.
not ok 3 - no warnings
# Failed test 'no warnings'
# at t/351_unpaper.t line 91.
ok 4 - Resolution of processed image
/tmp/DSK7RSEpdU/86_uDLL4ZK.pnm PBM 2104x2974 2104x2974+0+0 1-bit Bilevel Gray 782175B 0.010u 0:00.007
ok 5 - valid image created
ok 6 - using session directory
Your system does not have Image::PNG::Libpng installed, so some
PNG functions may not run correctly.
ok 7 - PDF is A4
ok 8 - cmdline v0.3
ok 9 - cmdline v0.4
# Looks like you planned 7 tests but ran 9.
# Looks like you failed 2 tests of 9 run.
This is due to a new warning in ffmpeg and unpaper needs to adapt
<https://github.com/unpaper/unpaper/issues/113>.
Until unpaper is fixed, this patch ignores the new warning.
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
t/351_unpaper.t | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/t/351_unpaper.t b/t/351_unpaper.t
index 9e6ff75a..71ae7c5f 100644
--- a/t/351_unpaper.t
+++ b/t/351_unpaper.t
@@ -88,8 +88,10 @@ SKIP: {
# if we use unlike, we no longer
# know how many tests there will be
- if ( $msg !~
-/(deprecated|Encoder did not produce proper pts, making some up)/
+ if ( $msg !~ /( deprecated |
+ \Qdoes not contain an image sequence pattern\E |
+ \QEncoder did not produce proper pts, making some up\E |
+ \Quse the -update option\E )/x
)
{
fail 'no warnings';
--
2.37.2