Mercurial > mplayer.hg
changeset 1652:e78cf3fc992e
shmem_alloc->memalign, adding function to free memory
author | arpi |
---|---|
date | Thu, 23 Aug 2001 11:54:08 +0000 |
parents | b8721b5ab23e |
children | a90e0d8eba7c |
files | libmpeg2/decode.c |
diffstat | 1 files changed, 15 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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];