Mercurial > audlegacy-plugins
changeset 788:2461b711162b trunk
[svn] - revert r1664 as it breaks too much
author | nenolod |
---|---|
date | Tue, 06 Mar 2007 15:43:15 -0800 |
parents | 9794a5487524 |
children | 354c69a939bc |
files | ChangeLog src/madplug/decoder.c src/madplug/input.c src/madplug/plugin.c |
diffstat | 4 files changed, 21 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Mar 06 06:53:31 2007 -0800 +++ b/ChangeLog Tue Mar 06 15:43:15 2007 -0800 @@ -1,3 +1,11 @@ +2007-03-06 14:53:31 +0000 Giacomo Lozito <james@develia.org> + revision [1672] + aosd: do not use str_to_utf8 + trunk/src/aosd/aosd_common.h | 2 +- + trunk/src/aosd/aosd_trigger.c | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + + 2007-03-06 13:17:29 +0000 Yoshiki Yazawa <yaz@cc.rim.or.jp> revision [1670] - avoid crash when error message doesn't contain <TITLE>.
--- a/src/madplug/decoder.c Tue Mar 06 06:53:31 2007 -0800 +++ b/src/madplug/decoder.c Tue Mar 06 15:43:15 2007 -0800 @@ -195,7 +195,7 @@ while (1) { remainder = stream.bufend - stream.next_frame; - + /* if (remainder >= BUFFER_SIZE) { @@ -211,7 +211,7 @@ #ifdef DEBUG g_message("scan_file: len <= 0 abort."); #endif - return 0; + break; } mad_stream_buffer(&stream, buffer, len + remainder);
--- a/src/madplug/input.c Tue Mar 06 06:53:31 2007 -0800 +++ b/src/madplug/input.c Tue Mar 06 15:43:15 2007 -0800 @@ -557,8 +557,9 @@ /* simply read to data from the file */ len = vfs_fread(buffer, 1, buffer_size, info->infile); //vfs_fread returns num of elements. - if(len == 0 && info->playback){ - info->playback->eof = TRUE; + if(len == 0){ + if(info->playback) + info->playback->eof = TRUE; } #ifdef DEBUG
--- a/src/madplug/plugin.c Tue Mar 06 06:53:31 2007 -0800 +++ b/src/madplug/plugin.c Tue Mar 06 15:43:15 2007 -0800 @@ -224,9 +224,6 @@ guchar tmp[4096]; gint ret, i; - if (fin == NULL) - return 0; - info.remote = FALSE; if(audmad_is_remote(filename)) @@ -239,10 +236,12 @@ !strcasecmp("tta", ext) || !strcasecmp("ogg", ext) || !strcasecmp("wma", ext) ) ) - return 0; + return FALSE; - if(vfs_fread(buf, 1, 4, fin) == 0) - return 0; + if (fin == NULL) + return FALSE; + + vfs_fread(buf, 1, 4, fin); check = mp3_head_convert(buf); @@ -253,8 +252,7 @@ else if (memcmp(buf, "RIFF", 4) == 0) { vfs_fseek(fin, 4, SEEK_CUR); - if(vfs_fread(buf, 1, 4, fin) == 0) - return 0; + vfs_fread(buf, 1, 4, fin); if (memcmp(buf, "RMP3", 4) == 0) return 1; @@ -262,7 +260,8 @@ while (!mp3_head_check(check)) { - if(vfs_fread(tmp, 1, 4096, fin) == 0) + ret = vfs_fread(tmp, 1, 4096, fin); + if (ret == 0) return 0; for (i = 0; i < ret; i++)