[Flac-dev] bug in xmms plugin v 1.1.2

Dan Mick dan.mick at sun.com
Thu Mar 31 20:05:09 PST 2005


I, like others here, have noticed that the xmms plugin is broken for 
first use in version 1.1.2.  The problem is confusion between 
dynamically-allocated and statically-allocated strings.  A quick, 
although perhaps not elegant, fix is included below.

Note: you would not see this if you already had a [flac] section in your 
config file, which probably explains how it escaped the notice of 
whoever added the streaming support, which is where this was introduced.
(BTW, thank you for the streaming support.)

------- plugin.c -------
--- /tmp/sccs.zza4YF    Thu Mar 31 20:03:46 2005
+++ plugin.c    Mon Mar 28 19:58:20 2005
@@ -219,6 +219,12 @@

         is_big_endian_host_ = (*((FLAC__byte*)(&test)))? false : true;

+       /* make all the config struct strings dynamic, to ease our life */
+       flac_cfg.stream.proxy_host = g_strdup(flac_cfg.stream.proxy_host);
+       flac_cfg.stream.proxy_user = g_strdup(flac_cfg.stream.proxy_user);
+       flac_cfg.stream.proxy_pass = g_strdup(flac_cfg.stream.proxy_pass);
+       flac_cfg.stream.save_http_path = 
g_strdup(flac_cfg.stream.save_http_path);
+
         flac_cfg.title.tag_override = FALSE;
         g_free(flac_cfg.title.tag_format);
         flac_cfg.title.convert_char_set = FALSE;


More information about the Flac-dev mailing list