[Mplayer-cvslog] CVS: main/libmpeg2 decode.c,1.11,1.12
Arpi of Ize
arpi at mplayer.dev.hu
Thu Aug 23 13:54:14 CEST 2001
Update of /cvsroot/mplayer/main/libmpeg2
In directory mplayer:/var/tmp.root/cvs-serv2353
Modified Files:
decode.c
Log Message:
shmem_alloc->memalign, adding function to free memory
Index: decode.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpeg2/decode.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- decode.c 22 Aug 2001 21:34:10 -0000 1.11
+++ decode.c 23 Aug 2001 11:54:08 -0000 1.12
@@ -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;
@@ -125,6 +125,19 @@
picture->forward_reference_frame=&frames[0];
picture->backward_reference_frame=&frames[1];
picture->current_frame=&frames[2];
+
+}
+
+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]);
+ }
}
More information about the MPlayer-cvslog
mailing list