diff options
author | Sebastian Dröge <slomo@circular-chaos.org> | 2008-05-16 22:00:49 +0000 |
---|---|---|
committer | Sebastian Dröge <slomo@circular-chaos.org> | 2008-05-16 22:00:49 +0000 |
commit | 67515f39fc7b1bba1e15d065e21ae3ca2ebeba1e (patch) | |
tree | 18e56860782037c1191c96b58409db8b20f354fc | |
parent | 5a00cae46fb77ec9a107797d5107f8db06a0dc36 (diff) | |
download | gst-plugins-bad-67515f39fc7b1bba1e15d065e21ae3ca2ebeba1e.tar.gz gst-plugins-bad-67515f39fc7b1bba1e15d065e21ae3ca2ebeba1e.tar.bz2 gst-plugins-bad-67515f39fc7b1bba1e15d065e21ae3ca2ebeba1e.zip |
ext/timidity/gstwildmidi.c: Check some more common locations for a valid configuration file.
Original commit message from CVS:
* ext/timidity/gstwildmidi.c: (wildmidi_open_config):
Check some more common locations for a valid configuration file.
Fixes bug #533435. Packagers should still #define WILDMIDI_CFG
to the distributions default location.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | ext/timidity/gstwildmidi.c | 22 |
2 files changed, 29 insertions, 0 deletions
@@ -1,5 +1,12 @@ 2008-05-16 Sebastian Dröge <slomo@circular-chaos.org> + * ext/timidity/gstwildmidi.c: (wildmidi_open_config): + Check some more common locations for a valid configuration file. + Fixes bug #533435. Packagers should still #define WILDMIDI_CFG + to the distributions default location. + +2008-05-16 Sebastian Dröge <slomo@circular-chaos.org> + * gst/interleave/Makefile.am: * gst/interleave/deinterleave.c: (deinterleave_24), (gst_deinterleave_finalize), (gst_deinterleave_base_init), diff --git a/ext/timidity/gstwildmidi.c b/ext/timidity/gstwildmidi.c index 66d545f2..1544d1aa 100644 --- a/ext/timidity/gstwildmidi.c +++ b/ext/timidity/gstwildmidi.c @@ -163,6 +163,17 @@ wildmidi_open_config () } if (path == NULL) { + path = + g_build_path (G_DIR_SEPARATOR_S, "/etc", "wildmidi", "wildmidi.cfg", + NULL); + GST_DEBUG ("trying %s", path); + if (path && (g_access (path, R_OK) == -1)) { + g_free (path); + path = NULL; + } + } + + if (path == NULL) { path = g_strdup (WILDMIDI_CFG); GST_DEBUG ("trying %s", path); if (path && (g_access (path, R_OK) == -1)) { @@ -181,6 +192,17 @@ wildmidi_open_config () } if (path == NULL) { + path = + g_build_path (G_DIR_SEPARATOR_S, "/etc", "timidity", "timidity.cfg", + NULL); + GST_DEBUG ("trying %s", path); + if (path && (g_access (path, R_OK) == -1)) { + g_free (path); + path = NULL; + } + } + + if (path == NULL) { /* I've created a symlink to get it playing * ln -s /usr/share/timidity/timidity.cfg /etc/wildmidi.cfg * we could make it use : WILDMIDI_CFG |