# HG changeset patch # User arpi # Date 998567648 0 # Node ID e78cf3fc992e6d65219937d0f6eefa42bafd3a36 # Parent b8721b5ab23ef18474045dd235a4e93dce2eb704 shmem_alloc->memalign, adding function to free memory diff -r b8721b5ab23e -r e78cf3fc992e libmpeg2/decode.c --- a/libmpeg2/decode.c Thu Aug 23 11:42:21 2001 +0000 +++ b/libmpeg2/decode.c Thu Aug 23 11:54:08 2001 +0000 @@ -81,7 +81,7 @@ // printf("libmpeg2 config flags = 0x%X\n",config.flags); - picture=shmem_alloc(sizeof(picture_t)); // !!! NEW HACK :) !!! + picture=malloc(sizeof(picture_t)); // !!! NEW HACK :) !!! header_state_init (picture); // picture->repeat_count=0; @@ -114,7 +114,7 @@ #else for(i=0;i<3;i++){ #endif - base = shmem_alloc(buff_size); + base = memalign(64,buff_size); frames[i].base[0] = base; frames[i].base[1] = base + frame_size * 5 / 4; frames[i].base[2] = base + frame_size; @@ -128,6 +128,19 @@ } +void mpeg2_free_image_buffers (picture_t * picture){ + int i; + +#ifdef MPEG12_POSTPROC + for(i=0;i<4;i++){ +#else + for(i=0;i<3;i++){ +#endif + free(frames[i].base[0]); + } + +} + static void copy_slice (vo_frame_t * frame, uint8_t ** src){ vo_functions_t * output = frame->vo; int stride[3];