Mercurial > libdvdnav.hg
diff read_cache.c @ 211:7eda95524e83 src
use uintptr_t for pointer arithmetics for AMD64 compatibility
(patch suggested by Adrian Schroeter)
author | mroi |
---|---|
date | Mon, 25 Aug 2003 14:23:13 +0000 |
parents | 4e099155c968 |
children | 9b1b740e3fc9 |
line wrap: on
line diff
--- a/read_cache.c Sun Aug 03 09:40:58 2003 +0000 +++ b/read_cache.c Mon Aug 25 14:23:13 2003 +0000 @@ -448,7 +448,7 @@ self->chunk[use].cache_buffer_base = realloc(self->chunk[use].cache_buffer_base, block_count * DVD_VIDEO_LB_LEN + ALIGNMENT); self->chunk[use].cache_buffer = - (uint8_t *)(((int)self->chunk[use].cache_buffer_base & ~(ALIGNMENT - 1)) + ALIGNMENT); + (uint8_t *)(((uintptr_t)self->chunk[use].cache_buffer_base & ~(ALIGNMENT - 1)) + ALIGNMENT); dprintf("pre_cache DVD read realloc happened\n"); self->chunk[use].cache_malloc_size = block_count; } else { @@ -466,7 +466,7 @@ self->chunk[i].cache_buffer_base = malloc((block_count > 500 ? block_count : 500) * DVD_VIDEO_LB_LEN + ALIGNMENT); self->chunk[i].cache_buffer = - (uint8_t *)(((int)self->chunk[i].cache_buffer_base & ~(ALIGNMENT - 1)) + ALIGNMENT); + (uint8_t *)(((uintptr_t)self->chunk[i].cache_buffer_base & ~(ALIGNMENT - 1)) + ALIGNMENT); self->chunk[i].cache_malloc_size = block_count > 500 ? block_count : 500; dprintf("pre_cache DVD read malloc %d blocks\n", (block_count > 500 ? block_count : 500 ));