From a1fc4db0fe834e9caa06aa1ebb1cb5397f0b61a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Wed, 12 Dec 2007 11:43:52 +0100 Subject: Use av_mallocz from libavutil rather than xine_xmalloc_aligned for allocating memory. --- src/video_out/yuv2rgb.c | 6 ++++-- src/video_out/yuv2rgb_mmx.c | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/video_out/yuv2rgb.c b/src/video_out/yuv2rgb.c index 0ca6537a7..99afed05f 100644 --- a/src/video_out/yuv2rgb.c +++ b/src/video_out/yuv2rgb.c @@ -31,6 +31,9 @@ #include #include +/* libavutil from FFmpeg */ +#include + #include "yuv2rgb.h" #define LOG_MODULE "yuv2rgb" @@ -3182,7 +3185,7 @@ static yuv2rgb_t *yuv2rgb_create_converter (yuv2rgb_factory_t *factory) { static void yuv2rgb_factory_dispose (yuv2rgb_factory_t *this) { free (this->table_base); - free (this->table_mmx_base); + av_free(this->table_mmx); free (this); } @@ -3203,7 +3206,6 @@ yuv2rgb_factory_t* yuv2rgb_factory_init (int mode, int swapped, this->matrix_coefficients = 6; this->table_base = NULL; this->table_mmx = NULL; - this->table_mmx_base = NULL; yuv2rgb_set_csc_levels (this, 0, 128, 128); diff --git a/src/video_out/yuv2rgb_mmx.c b/src/video_out/yuv2rgb_mmx.c index 20a9b5a00..3d834d672 100644 --- a/src/video_out/yuv2rgb_mmx.c +++ b/src/video_out/yuv2rgb_mmx.c @@ -31,6 +31,9 @@ #include #include +/* libavutil from FFmpeg */ +#include + #include "yuv2rgb.h" #include "xineutils.h" @@ -70,7 +73,7 @@ void mmx_yuv2rgb_set_csc_levels(yuv2rgb_factory_t *this, /* 'table_mmx' is 64bit aligned for better performance */ if (this->table_mmx == NULL) { - this->table_mmx = xine_xmalloc_aligned (8, sizeof(mmx_csc_t), &this->table_mmx_base); + this->table_mmx = av_mallocz(sizeof(mmx_csc_t)); } if( brightness <= 16 ) { -- cgit v1.2.3