commit 327706e5bde586596241581c23528277d9f0dcf5
Author: Vasiliy Glazov <vascom2(a)gmail.com>
Date: Mon Sep 23 09:05:22 2019 +0300
Fix crash.
6fca3f16616f4f46c1647fe4610e57c8c9ae74ff.patch | 27 ++++++++++++++++++++++++++
celluloid.spec | 8 ++++++--
2 files changed, 33 insertions(+), 2 deletions(-)
---
diff --git a/6fca3f16616f4f46c1647fe4610e57c8c9ae74ff.patch
b/6fca3f16616f4f46c1647fe4610e57c8c9ae74ff.patch
new file mode 100644
index 0000000..04c9f9f
--- /dev/null
+++ b/6fca3f16616f4f46c1647fe4610e57c8c9ae74ff.patch
@@ -0,0 +1,27 @@
+From 6fca3f16616f4f46c1647fe4610e57c8c9ae74ff Mon Sep 17 00:00:00 2001
+From: gnome-mpv <gnome-mpv@nowhere>
+Date: Fri, 20 Sep 2019 21:39:46 +0700
+Subject: [PATCH] model: Work around mpv crash when running keyup command
+ without arguments
+
+Fixes #468.
+Fixes #471.
+---
+ src/celluloid-model.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/celluloid-model.c b/src/celluloid-model.c
+index 4e0e240..52e6a7f 100644
+--- a/src/celluloid-model.c
++++ b/src/celluloid-model.c
+@@ -803,7 +803,9 @@ celluloid_model_key_press(CelluloidModel *model, const gchar*
keystr)
+ void
+ celluloid_model_reset_keys(CelluloidModel *model)
+ {
+- const gchar *cmd[] = {"keyup", NULL};
++ // As of Sep 20, 2019, mpv will crash if the command doesn't have any
++ // arguments. The empty string is there to work around the issue.
++ const gchar *cmd[] = {"keyup", "", NULL};
+
+ g_debug("Sent global key up to mpv");
+ celluloid_mpv_command_async(CELLULOID_MPV(model), cmd);
diff --git a/celluloid.spec b/celluloid.spec
index 535f774..5a59950 100644
--- a/celluloid.spec
+++ b/celluloid.spec
@@ -1,11 +1,12 @@
Name: celluloid
Version: 0.17
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: A simple GTK+ frontend for mpv
License: GPLv3+
URL:
https://github.com/celluloid-player/celluloid
Source0: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.xz
+Patch0: 6fca3f16616f4f46c1647fe4610e57c8c9ae74ff.patch
BuildRequires: gcc
BuildRequires: desktop-file-utils
@@ -27,7 +28,7 @@ Celluloid (formerly GNOME MPV) is a simple GTK+ frontend for mpv.
It aims to be easy to use while maintaining high level of configurability.
%prep
-%autosetup
+%autosetup -p1
%build
%configure
@@ -56,6 +57,9 @@ desktop-file-validate
%{buildroot}%{_datadir}/applications/io.github.celluloid_p
%{_mandir}/man1/%{name}.1.*
%changelog
+* Mon Sep 23 2019 Vasiliy N. Glazov <vascom2(a)gmail.com> - 0.17-2
+- Fix crash #5392
+
* Fri Aug 09 2019 Vasiliy N. Glazov <vascom2(a)gmail.com> - 0.17-1
- Update to 0.17
- Renamed gnome-mpv to celluloid