# HG changeset patch # User nenolod # Date 1171981889 28800 # Node ID 0305b3165a01be722aa4da3317d7ee6c0ad76e30 # Parent 9e85901ac6c00f66e5926c40f622dc3f192e882f [svn] - ringbuffering underrun fixups -- found with purify diff -r 9e85901ac6c0 -r 0305b3165a01 ChangeLog --- 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 + 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 revision [1462] - some ringbuffering fixes -- aac+ shouldn't crash now, but more diff -r 9e85901ac6c0 -r 0305b3165a01 src/aac/src/libmp4.c --- 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);