summaryrefslogtreecommitdiffstats
path: root/libmpeg2
diff options
context:
space:
mode:
Diffstat (limited to 'libmpeg2')
-rw-r--r--libmpeg2/decode.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/libmpeg2/decode.c b/libmpeg2/decode.c
index bb7939db96..9891df6991 100644
--- a/libmpeg2/decode.c
+++ b/libmpeg2/decode.c
@@ -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];