Mercurial > libdvdnav.hg
diff read_cache.c @ 242:f794e1c17947 src
porting AMD64 patches from xine (provided by Goetz Waschk and Gwenole Beauchesne
from Mandrake)
author | mroi |
---|---|
date | Wed, 03 Mar 2004 16:48:36 +0000 |
parents | 065a2835ba90 |
children | ef3b33441db5 |
line wrap: on
line diff
--- a/read_cache.c Mon Feb 23 18:14:42 2004 +0000 +++ b/read_cache.c Wed Mar 03 16:48:36 2004 +0000 @@ -1,5 +1,6 @@ /* * Copyright (C) 2000 Rich Wareham <richwareham@users.sourceforge.net> + * 2001-2004 the dvdnav project * * This file is part of libdvdnav, a DVD navigation library. * @@ -181,7 +182,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 *)(((uintptr_t)self->chunk[use].cache_buffer_base & ~(ALIGNMENT - 1)) + ALIGNMENT); + (uint8_t *)(((uintptr_t)self->chunk[use].cache_buffer_base & ~((uintptr_t)(ALIGNMENT - 1))) + ALIGNMENT); dprintf("pre_cache DVD read realloc happened\n"); self->chunk[use].cache_malloc_size = block_count; } else { @@ -199,7 +200,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 *)(((uintptr_t)self->chunk[i].cache_buffer_base & ~(ALIGNMENT - 1)) + ALIGNMENT); + (uint8_t *)(((uintptr_t)self->chunk[i].cache_buffer_base & ~((uintptr_t)(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 ));