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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1B52E138334 for ; Sun, 22 Jul 2018 21:50:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7B3BEE0963; Sun, 22 Jul 2018 21:50:51 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2D3A3E0968 for ; Sun, 22 Jul 2018 21:50:51 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 335FE335D90 for ; Sun, 22 Jul 2018 21:50:49 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2B62537E for ; Sun, 22 Jul 2018 21:50:47 +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: <1532296155.9d08e036fc964ca46457d1784c244fb6b34b6284.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-6.6.0-png-segfault.patch media-libs/mlt/mlt-6.6.0-r1.ebuild X-VCS-Directories: media-libs/mlt/ media-libs/mlt/files/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 9d08e036fc964ca46457d1784c244fb6b34b6284 X-VCS-Branch: master Date: Sun, 22 Jul 2018 21:50:47 +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-Archives-Salt: 81cea8c5-5145-4c3d-a752-35e27909618e X-Archives-Hash: a0c328792dc0d53fc060bd4fbd734b51 commit: 9d08e036fc964ca46457d1784c244fb6b34b6284 Author: Andreas Sturmlechner gentoo org> AuthorDate: Sun Jul 22 20:11:37 2018 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Sun Jul 22 21:49:15 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9d08e036 media-libs/mlt: Fix png 8-bit segfault Package-Manager: Portage-2.3.43, Repoman-2.3.10 media-libs/mlt/files/mlt-6.6.0-png-segfault.patch | 36 +++++++++++++++++++++++ media-libs/mlt/mlt-6.6.0-r1.ebuild | 1 + 2 files changed, 37 insertions(+) diff --git a/media-libs/mlt/files/mlt-6.6.0-png-segfault.patch b/media-libs/mlt/files/mlt-6.6.0-png-segfault.patch new file mode 100644 index 00000000000..c93458a8273 --- /dev/null +++ b/media-libs/mlt/files/mlt-6.6.0-png-segfault.patch @@ -0,0 +1,36 @@ +From e013fd7c2f49b40a1b482d712d531329d538da88 Mon Sep 17 00:00:00 2001 +From: Brian Matherly +Date: Wed, 31 Jan 2018 20:57:42 -0600 +Subject: [PATCH] Fix segmentation fault when using qimage png producer #296 + +--- + src/modules/qt/qimage_wrapper.cpp | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/src/modules/qt/qimage_wrapper.cpp b/src/modules/qt/qimage_wrapper.cpp +index 436f65d15..99b4ebf8e 100644 +--- a/src/modules/qt/qimage_wrapper.cpp ++++ b/src/modules/qt/qimage_wrapper.cpp +@@ -229,18 +229,19 @@ void refresh_image( producer_qimage self, mlt_frame frame, mlt_image_format form + QString interps = mlt_properties_get( properties, "rescale.interp" ); + bool interp = ( interps != "nearest" ) && ( interps != "none" ); + QImage *qimage = static_cast( self->qimage ); ++ int has_alpha = qimage->hasAlphaChannel(); ++ QImage::Format qimageFormat = has_alpha ? QImage::Format_ARGB32 : QImage::Format_RGB32; + + // Note - the original qimage is already safe and ready for destruction +- if ( qimage->depth() == 1 ) ++ if ( qimage->format() != qimageFormat ) + { +- QImage temp = qimage->convertToFormat( QImage::Format_RGB32 ); ++ QImage temp = qimage->convertToFormat( qimageFormat ); + delete qimage; + qimage = new QImage( temp ); + self->qimage = qimage; + } + QImage scaled = interp? qimage->scaled( QSize( width, height ) ) : + qimage->scaled( QSize(width, height), Qt::IgnoreAspectRatio, Qt::SmoothTransformation ); +- int has_alpha = scaled.hasAlphaChannel(); + + // Store width and height + self->current_width = width; diff --git a/media-libs/mlt/mlt-6.6.0-r1.ebuild b/media-libs/mlt/mlt-6.6.0-r1.ebuild index 3e57dbb3e1e..b0b811b945d 100644 --- a/media-libs/mlt/mlt-6.6.0-r1.ebuild +++ b/media-libs/mlt/mlt-6.6.0-r1.ebuild @@ -98,6 +98,7 @@ DOCS=( AUTHORS ChangeLog NEWS README docs/{framework,melt,mlt{++,-xml}}.txt ) PATCHES=( "${FILESDIR}"/${P}-vorbis-ffmpeg-3.4.patch "${FILESDIR}"/${P}-libav-{1,2,3}.patch + "${FILESDIR}"/${P}-png-segfault.patch ) pkg_setup() {