1 |
commit: 62a081d800ec28836843c9a2db67ed80cbb52b12 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jun 30 21:00:29 2020 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jun 30 21:44:02 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62a081d8 |
7 |
|
8 |
media-libs/mlt: fix crash with filters not supporting preview scale |
9 |
|
10 |
Upstream commit dc585bfa5765db418923e7b4802c03bc57733111 |
11 |
|
12 |
Package-Manager: Portage-2.3.103, Repoman-2.3.23 |
13 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
14 |
|
15 |
...-6.20.0-crash-w-unsupported-preview-scale.patch | 48 ++++++++++++++++++++++ |
16 |
media-libs/mlt/mlt-6.20.0-r2.ebuild | 1 + |
17 |
2 files changed, 49 insertions(+) |
18 |
|
19 |
diff --git a/media-libs/mlt/files/mlt-6.20.0-crash-w-unsupported-preview-scale.patch b/media-libs/mlt/files/mlt-6.20.0-crash-w-unsupported-preview-scale.patch |
20 |
new file mode 100644 |
21 |
index 00000000000..25057b3c1ae |
22 |
--- /dev/null |
23 |
+++ b/media-libs/mlt/files/mlt-6.20.0-crash-w-unsupported-preview-scale.patch |
24 |
@@ -0,0 +1,48 @@ |
25 |
+From dc585bfa5765db418923e7b4802c03bc57733111 Mon Sep 17 00:00:00 2001 |
26 |
+From: Dan Dennedy <dan@×××××××.org> |
27 |
+Date: Mon, 2 Mar 2020 14:02:26 -0800 |
28 |
+Subject: [PATCH] fix crash with filters not supporting preview scale |
29 |
+ |
30 |
+--- |
31 |
+ src/modules/frei0r/transition_frei0r.c | 18 +++++++++++++++++- |
32 |
+ 1 file changed, 17 insertions(+), 1 deletion(-) |
33 |
+ |
34 |
+diff --git a/src/modules/frei0r/transition_frei0r.c b/src/modules/frei0r/transition_frei0r.c |
35 |
+index b69011719..f11266b75 100644 |
36 |
+--- a/src/modules/frei0r/transition_frei0r.c |
37 |
++++ b/src/modules/frei0r/transition_frei0r.c |
38 |
+@@ -1,7 +1,7 @@ |
39 |
+ /* |
40 |
+ * transition_frei0r.c -- frei0r transition |
41 |
+ * Copyright (c) 2008 Marco Gittler <g.marco@×××××××.de> |
42 |
+- * Copyright (C) 2009-2019 Meltytech, LLC |
43 |
++ * Copyright (C) 2009-2020 Meltytech, LLC |
44 |
+ * |
45 |
+ * This library is free software; you can redistribute it and/or |
46 |
+ * modify it under the terms of the GNU Lesser General Public |
47 |
+@@ -67,9 +67,25 @@ static int transition_get_image( mlt_frame a_frame, uint8_t **image, mlt_image_f |
48 |
+ } |
49 |
+ else |
50 |
+ { |
51 |
++ mlt_image_format b_format = *format; |
52 |
++ int b_width = *width; |
53 |
++ int b_height = *height; |
54 |
++ |
55 |
+ error = mlt_frame_get_image( a_frame, &images[0], format, width, height, 0 ); |
56 |
+ if ( error ) return error; |
57 |
+ |
58 |
++ if (*width != b_width || *height != b_height) { |
59 |
++ if (invert) { |
60 |
++ *image = images[0]; |
61 |
++ } else { |
62 |
++ *image = images[1]; |
63 |
++ *format = b_format; |
64 |
++ *width = b_width; |
65 |
++ *height = b_height; |
66 |
++ } |
67 |
++ return error; |
68 |
++ } |
69 |
++ |
70 |
+ mlt_position position = mlt_transition_get_position( transition, a_frame ); |
71 |
+ mlt_profile profile = mlt_service_profile( MLT_TRANSITION_SERVICE( transition ) ); |
72 |
+ double time = (double) position / mlt_profile_fps( profile ); |
73 |
|
74 |
diff --git a/media-libs/mlt/mlt-6.20.0-r2.ebuild b/media-libs/mlt/mlt-6.20.0-r2.ebuild |
75 |
index 4f93b42419b..d261114c200 100644 |
76 |
--- a/media-libs/mlt/mlt-6.20.0-r2.ebuild |
77 |
+++ b/media-libs/mlt/mlt-6.20.0-r2.ebuild |
78 |
@@ -88,6 +88,7 @@ PATCHES=( |
79 |
"${FILESDIR}"/${P}-no-gtk2.patch |
80 |
"${FILESDIR}"/${P}-opencv4.patch |
81 |
"${FILESDIR}"/${P}-nullpointer-crash.patch |
82 |
+ "${FILESDIR}"/${P}-crash-w-unsupported-preview-scale.patch |
83 |
) |
84 |
|
85 |
pkg_setup() { |