Mercurial > audlegacy-plugins
changeset 690:0305b3165a01 trunk
[svn] - ringbuffering underrun fixups -- found with purify
author | nenolod |
---|---|
date | Tue, 20 Feb 2007 06:31:29 -0800 |
parents | 9e85901ac6c0 |
children | e6c5fdae6e88 |
files | ChangeLog src/aac/src/libmp4.c |
diffstat | 2 files changed, 10 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Feb 20 06:23:44 2007 -0800 +++ b/ChangeLog Tue Feb 20 06:31:29 2007 -0800 @@ -1,3 +1,11 @@ +2007-02-20 14:23:44 +0000 William Pitcock <nenolod@sacredspiral.co.uk> + revision [1464] + - some additional cleanups + + trunk/src/aac/src/libmp4.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + + 2007-02-20 14:17:27 +0000 William Pitcock <nenolod@sacredspiral.co.uk> revision [1462] - some ringbuffering fixes -- aac+ shouldn't crash now, but more
--- a/src/aac/src/libmp4.c Tue Feb 20 06:23:44 2007 -0800 +++ b/src/aac/src/libmp4.c Tue Feb 20 06:31:29 2007 -0800 @@ -698,7 +698,7 @@ bufferconsumed = aac_probe(buffer, buffervalid); if(bufferconsumed) { - memmove(buffer, &buffer[bufferconsumed], buffervalid-bufferconsumed); + memmove(buffer, &buffer[bufferconsumed], buffervalid); buffervalid -= bufferconsumed; buffervalid += vfs_fread(&buffer[buffervalid], 1, BUFFER_SIZE-buffervalid, file); @@ -732,7 +732,7 @@ char* sample_buffer = NULL; if(bufferconsumed > 0){ - memmove(buffer, &buffer[bufferconsumed], buffervalid-bufferconsumed); + memmove(buffer, &buffer[bufferconsumed], buffervalid); buffervalid -= bufferconsumed; buffervalid += vfs_fread(&buffer[buffervalid], 1, BUFFER_SIZE-buffervalid, file);