mirror of
https://github.com/mpv-player/mpv
synced 2025-01-30 11:42:04 +00:00
shmem_alloc->memalign, adding function to free memory
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1653 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
0260d3c66e
commit
79b24caa22
@ -81,7 +81,7 @@ void mpeg2_init (void)
|
||||
|
||||
// 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 @@ void mpeg2_allocate_image_buffers (picture_t * picture)
|
||||
#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_allocate_image_buffers (picture_t * picture)
|
||||
|
||||
}
|
||||
|
||||
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];
|
||||
|
Loading…
Reference in New Issue
Block a user