From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 68DF815814D for ; Sun, 8 Oct 2023 14:37:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A38302BC016; Sun, 8 Oct 2023 14:37:58 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 860292BC016 for ; Sun, 8 Oct 2023 14:37:58 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 954F2335CB4 for ; Sun, 8 Oct 2023 14:37:57 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 07443A16 for ; Sun, 8 Oct 2023 14:37:56 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1696775850.7175b838fce852b050cc031dcb5141d8499cb539.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/mlt/, media-libs/mlt/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-libs/mlt/files/mlt-7.20.0-qtblend-crash.patch media-libs/mlt/files/mlt-7.20.0-rotoscoping-crash.patch media-libs/mlt/mlt-7.20.0.ebuild X-VCS-Directories: media-libs/mlt/ media-libs/mlt/files/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 7175b838fce852b050cc031dcb5141d8499cb539 X-VCS-Branch: master Date: Sun, 8 Oct 2023 14:37:56 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: d298fdb8-260f-4ccc-8f2d-ce7b5fddd546 X-Archives-Hash: fbcf1c8d0ccbfd03facd60ea029d6bc4 commit: 7175b838fce852b050cc031dcb5141d8499cb539 Author: Andreas Sturmlechner gentoo org> AuthorDate: Sun Oct 8 12:21:15 2023 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Sun Oct 8 14:37:30 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7175b838 media-libs/mlt: Backport crash fixes post-7.20 release Upstream commits: 482f1fb0179587575b3071f622df51a95895068a 09f55bf3d1fdcac06c5d297bb27cb4f3e7f85021 Signed-off-by: Andreas Sturmlechner gentoo.org> .../mlt/files/mlt-7.20.0-qtblend-crash.patch | 43 ++++++++++++++++++++++ .../mlt/files/mlt-7.20.0-rotoscoping-crash.patch | 22 +++++++++++ media-libs/mlt/mlt-7.20.0.ebuild | 3 ++ 3 files changed, 68 insertions(+) diff --git a/media-libs/mlt/files/mlt-7.20.0-qtblend-crash.patch b/media-libs/mlt/files/mlt-7.20.0-qtblend-crash.patch new file mode 100644 index 000000000000..aad8f0e9e45c --- /dev/null +++ b/media-libs/mlt/files/mlt-7.20.0-qtblend-crash.patch @@ -0,0 +1,43 @@ +From 09f55bf3d1fdcac06c5d297bb27cb4f3e7f85021 Mon Sep 17 00:00:00 2001 +From: Jean-Baptiste Mardelle +Date: Thu, 5 Oct 2023 08:45:16 +0200 +Subject: [PATCH] Ensure qtblend doesn't request an image of 0 width or height + (crashes many filters) + +--- + src/modules/qt/filter_qtblend.cpp | 6 +++--- + src/modules/qt/transition_qtblend.cpp | 3 +++ + 2 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/src/modules/qt/filter_qtblend.cpp b/src/modules/qt/filter_qtblend.cpp +index d54f7ccad..32d752d60 100644 +--- a/src/modules/qt/filter_qtblend.cpp ++++ b/src/modules/qt/filter_qtblend.cpp +@@ -103,10 +103,10 @@ static int filter_get_image(mlt_frame frame, + || rect.h != *height; + + if (mlt_properties_get_int(properties, "distort") == 0) { +- b_height = qMin((int) rect.h, b_height); +- b_width = b_height * b_dar / b_ar / consumer_ar; ++ b_height = qMax(1, qMin((int) rect.h, b_height)); ++ b_width = qMax(1, int(b_height * b_dar / b_ar / consumer_ar)); + } else { +- b_width *= b_ar / consumer_ar; ++ b_width = qMax(1, int(b_width * b_ar / consumer_ar)); + } + if (!hasAlpha && (b_width < *width || b_height < *height)) { + hasAlpha = true; +diff --git a/src/modules/qt/transition_qtblend.cpp b/src/modules/qt/transition_qtblend.cpp +index 9dbc795aa..0b41b3ff8 100644 +--- a/src/modules/qt/transition_qtblend.cpp ++++ b/src/modules/qt/transition_qtblend.cpp +@@ -121,6 +121,9 @@ static int get_image(mlt_frame a_frame, + // we will process operations on top frame, so also process b_frame + forceAlpha = true; + } ++ // Ensure we don't request an image with a 0 width or height ++ b_width = qMax(1, b_width); ++ b_height = qMax(1, b_height); + } else { + b_height = *height; + b_width = *width; diff --git a/media-libs/mlt/files/mlt-7.20.0-rotoscoping-crash.patch b/media-libs/mlt/files/mlt-7.20.0-rotoscoping-crash.patch new file mode 100644 index 000000000000..124e1102b6d2 --- /dev/null +++ b/media-libs/mlt/files/mlt-7.20.0-rotoscoping-crash.patch @@ -0,0 +1,22 @@ +From 482f1fb0179587575b3071f622df51a95895068a Mon Sep 17 00:00:00 2001 +From: Jean-Baptiste Mardelle +Date: Wed, 4 Oct 2023 22:26:13 +0200 +Subject: [PATCH] Fix rotoscoping filter crash on image with height = 0 + +--- + src/modules/plusgpl/filter_rotoscoping.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/modules/plusgpl/filter_rotoscoping.c b/src/modules/plusgpl/filter_rotoscoping.c +index 35e3931f0..782c39422 100644 +--- a/src/modules/plusgpl/filter_rotoscoping.c ++++ b/src/modules/plusgpl/filter_rotoscoping.c +@@ -337,7 +337,7 @@ static int filter_get_image(mlt_frame frame, + int offsetx = 0; + int offsety = 0; + // Compare aspect ratio +- if (100 * *width / *height != 100 * normalized_width / normalized_height) { ++ if (*height > 0 && 100 * *width / *height != 100 * normalized_width / normalized_height) { + // Source has a different aspect ratio, apply scaling + double xfactor = normalized_width / *width; + double yfactor = normalized_height / *height; diff --git a/media-libs/mlt/mlt-7.20.0.ebuild b/media-libs/mlt/mlt-7.20.0.ebuild index db7be1c8207b..b84f4931436a 100644 --- a/media-libs/mlt/mlt-7.20.0.ebuild +++ b/media-libs/mlt/mlt-7.20.0.ebuild @@ -82,9 +82,12 @@ BDEPEND=" DOCS=( AUTHORS NEWS README.md ) PATCHES=( + # downstream "${FILESDIR}"/${PN}-6.10.0-swig-underlinking.patch "${FILESDIR}"/${PN}-6.22.1-no_lua_bdepend.patch "${FILESDIR}"/${PN}-7.0.1-cmake-symlink.patch + # upstream (>=7.21.0) + "${FILESDIR}"/${P}-{rotoscoping,qtblend}-crash.patch ) pkg_setup() {