# HG changeset patch # User yaz # Date 1162715685 28800 # Node ID a6f6309ab0a00ed9a8c45fcf4397fae012e1cb2b # Parent 3f2e3c5c30ed451893d2614866d515b3e7f64f2b [svn] - fix for stream save if filename duplicates exist diff -r 3f2e3c5c30ed -r a6f6309ab0a0 ChangeLog --- a/ChangeLog Sat Nov 04 23:03:45 2006 -0800 +++ b/ChangeLog Sun Nov 05 00:34:45 2006 -0800 @@ -1,3 +1,11 @@ +2006-11-05 07:03:45 +0000 William Pitcock + revision [434] + - make esd plugin assume that write() isn't always successful due to threading contingency. closes #427. patch by . + + trunk/src/esd/audio.c | 17 +++++++++++++---- + 1 file changed, 13 insertions(+), 4 deletions(-) + + 2006-11-04 21:14:27 +0000 Aaron Sheldon revision [432] Works again on x86 diff -r 3f2e3c5c30ed -r a6f6309ab0a0 src/mpg123/http.c --- a/src/mpg123/http.c Sat Nov 04 23:03:45 2006 -0800 +++ b/src/mpg123/http.c Sun Nov 05 00:34:45 2006 -0800 @@ -625,26 +625,27 @@ } while (redirect); if (mpgdec_cfg.save_http_stream) { - gchar *output_name; + gchar *output_name_seed, *output_name; gint i = 1; file = mpgdec_http_get_title(url); - output_name = file; - if (!strncasecmp(output_name, "http://", 7)) - output_name += 7; - temp = strrchr(output_name, '.'); + output_name_seed = file; + if (!strncasecmp(output_name_seed, "http://", 7)) + output_name_seed += 7; + temp = strrchr(output_name_seed, '.'); if (temp && !strcasecmp(temp, ".mp3")) *temp = '\0'; - while ((temp = strchr(output_name, '/'))) + while ((temp = strchr(output_name_seed, '/'))) *temp = '_'; + output_name = g_strdup_printf("%s/%s.mp3", - mpgdec_cfg.save_http_path, output_name); + mpgdec_cfg.save_http_path, output_name_seed); while (!access(output_name, F_OK) && i < 100000) { g_free(output_name); output_name = g_strdup_printf("%s/%s-%d.mp3", mpgdec_cfg.save_http_path, - output_name, i++); + output_name_seed, i++); } g_free(file);