summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2020-06-30 23:00:29 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2020-06-30 23:44:02 +0200
commit62a081d800ec28836843c9a2db67ed80cbb52b12 (patch)
tree648893107fa4f33a93c234e57a44387cf3eddfd6 /media-libs/mlt/files
parentmedia-libs/mlt: fix null pointer crash in mix transition (diff)
downloadgentoo-62a081d800ec28836843c9a2db67ed80cbb52b12.tar.gz
gentoo-62a081d800ec28836843c9a2db67ed80cbb52b12.tar.bz2
gentoo-62a081d800ec28836843c9a2db67ed80cbb52b12.zip
media-libs/mlt: fix crash with filters not supporting preview scale
Upstream commit dc585bfa5765db418923e7b4802c03bc57733111 Package-Manager: Portage-2.3.103, Repoman-2.3.23 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'media-libs/mlt/files')
-rw-r--r--media-libs/mlt/files/mlt-6.20.0-crash-w-unsupported-preview-scale.patch48
1 files changed, 48 insertions, 0 deletions
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
new file mode 100644
index 000000000000..25057b3c1aeb
--- /dev/null
+++ b/media-libs/mlt/files/mlt-6.20.0-crash-w-unsupported-preview-scale.patch
@@ -0,0 +1,48 @@
+From dc585bfa5765db418923e7b4802c03bc57733111 Mon Sep 17 00:00:00 2001
+From: Dan Dennedy <dan@dennedy.org>
+Date: Mon, 2 Mar 2020 14:02:26 -0800
+Subject: [PATCH] fix crash with filters not supporting preview scale
+
+---
+ src/modules/frei0r/transition_frei0r.c | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/src/modules/frei0r/transition_frei0r.c b/src/modules/frei0r/transition_frei0r.c
+index b69011719..f11266b75 100644
+--- a/src/modules/frei0r/transition_frei0r.c
++++ b/src/modules/frei0r/transition_frei0r.c
+@@ -1,7 +1,7 @@
+ /*
+ * transition_frei0r.c -- frei0r transition
+ * Copyright (c) 2008 Marco Gittler <g.marco@freenet.de>
+- * Copyright (C) 2009-2019 Meltytech, LLC
++ * Copyright (C) 2009-2020 Meltytech, LLC
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+@@ -67,9 +67,25 @@ static int transition_get_image( mlt_frame a_frame, uint8_t **image, mlt_image_f
+ }
+ else
+ {
++ mlt_image_format b_format = *format;
++ int b_width = *width;
++ int b_height = *height;
++
+ error = mlt_frame_get_image( a_frame, &images[0], format, width, height, 0 );
+ if ( error ) return error;
+
++ if (*width != b_width || *height != b_height) {
++ if (invert) {
++ *image = images[0];
++ } else {
++ *image = images[1];
++ *format = b_format;
++ *width = b_width;
++ *height = b_height;
++ }
++ return error;
++ }
++
+ mlt_position position = mlt_transition_get_position( transition, a_frame );
+ mlt_profile profile = mlt_service_profile( MLT_TRANSITION_SERVICE( transition ) );
+ double time = (double) position / mlt_profile_fps( profile );