[vlc-devel] [PATCH] codec: fluidsynth: look for sound fonts in $XDG_DATA_DIRS

Thomas Guillem thomas at gllm.fr
Sun Feb 25 12:21:29 CET 2018


Hi,

+        char *psz_glob_pat = malloc (PATH_MAX);
+        strncpy (psz_glob_pat, psz_dir, strlen (psz_dir) + 1);
+        strncat (psz_glob_pat, psz_glob_suffix, PATH_MAX - strnlen
         (psz_dir, PATH_MAX));
You should use asprintf here

+        if (!SetSoundfont (p_this, p_sys, "/sounds/sf2/*.sf2"))
+        if (!SetSoundfont (p_this, p_sys, "/soundfonts/*.sf2")) {}

This code is weird to read.


On Fri, Feb 23, 2018, at 10:09, Raitis V wrote:
> Hi,
> 
> The attached patch fixes the issue #19795:
> https://trac.videolan.org/vlc/ticket/19795> 
> I've compiled and tested the functionality on the 2.x branch, but it
> merges with should work on master too.> 
> Out of the box soundfont detection didn't work for me on Arch Linux
> and not it doesn't work on NixOS, so that's why I wanted to fix this.> 
> -- 
> Raitis Veinbahs
> _________________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
> Email had 1 attachment:


>  * 0001-codec-fluidsynth-look-for-sound-fonts-in-XDG_DATA_DI.patch 5k
>    (text/x-patch)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20180225/a6e4392c/attachment.html>


More information about the vlc-devel mailing list