summaryrefslogtreecommitdiff
path: root/media-sound/audacious/files/audacious-3.10-ui-freeze.patch
blob: da05bc5b00096bd218d386f3a79dfb01ec983e9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From 8f9745a5a539e44244d5e8200c61ed443c638aad Mon Sep 17 00:00:00 2001
From: John Lindgren <john@jlindgren.net>
Date: Sun, 19 Aug 2018 13:47:17 -0400
Subject: [PATCH] Prevent UI freeze when displaying song info window.  Closes:
 #822.

---
 src/libaudcore/probe.cc | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/libaudcore/probe.cc b/src/libaudcore/probe.cc
index 5c57ef884..38cf73d96 100644
--- a/src/libaudcore/probe.cc
+++ b/src/libaudcore/probe.cc
@@ -242,6 +242,15 @@ EXPORT bool aud_custom_infowin (const char * filename, PluginHandle * decoder)
     if (! strncmp (filename, "stdin://", 8))
         return false;
 
+    // In hindsight, a flag should have been added indicating whether a
+    // plugin provides a custom info window or not.  Currently, only two
+    // plugins do so.  Since custom info windows are deprecated anyway,
+    // check for those two plugins explicitly and in all other cases,
+    // don't open the input file to prevent freezing the UI.
+    const char * base = aud_plugin_get_basename (decoder);
+    if (strcmp (base, "amidi-plug") && strcmp (base, "vtx"))
+        return false;
+
     auto ip = (InputPlugin *) aud_plugin_get_header (decoder);
     if (! ip)
         return false;