From 3999004c72e12aa3f718ae08c1fec5d50753af65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Wed, 12 Dec 2007 12:31:03 +0100 Subject: Remove use of xine_xmalloc_aligned() in libxine, and link it to libavutil. --- src/xine-engine/buffer.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'src/xine-engine/buffer.c') diff --git a/src/xine-engine/buffer.c b/src/xine-engine/buffer.c index 93ad75ba0..c116f180a 100644 --- a/src/xine-engine/buffer.c +++ b/src/xine-engine/buffer.c @@ -36,6 +36,9 @@ #include #include +/* libavutil from FFmpeg */ +#include + /********** logging **********/ #define LOG_MODULE "buffer" #define LOG_VERBOSE @@ -358,7 +361,7 @@ static void fifo_buffer_dispose (fifo_buffer_t *this) { received++; } - free (this->buffer_pool_base); + av_free (this->buffer_pool_base); pthread_mutex_destroy(&this->mutex); pthread_cond_destroy(&this->not_empty); pthread_mutex_destroy(&this->buffer_pool_mutex); @@ -497,7 +500,6 @@ fifo_buffer_t *_x_fifo_buffer_new (int num_buffers, uint32_t buf_size) { fifo_buffer_t *this; int i; - int alignment = 2048; unsigned char *multi_buffer = NULL; this = xine_xmalloc (sizeof (fifo_buffer_t)); @@ -527,15 +529,11 @@ fifo_buffer_t *_x_fifo_buffer_new (int num_buffers, uint32_t buf_size) { */ - if (buf_size % alignment != 0) - buf_size += alignment - (buf_size % alignment); - /* - printf ("Allocating %d buffers of %ld bytes in one chunk (alignment = %d)\n", - num_buffers, (long int) buf_size, alignment); + printf ("Allocating %d buffers of %ld bytes in one chunk\n", + num_buffers, (long int) buf_size); */ - multi_buffer = xine_xmalloc_aligned (alignment, num_buffers * buf_size, - &this->buffer_pool_base); + multi_buffer = this->buffer_pool_base = av_mallocz (num_buffers * buf_size); this->buffer_pool_top = NULL; -- cgit v1.2.3 From 19357940a57c565ebe319729bd08d6e4800aff5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sat, 1 Mar 2008 04:00:18 +0100 Subject: Update to the new FFmpeg's include directory. This also allows to remove the comment stating the includes come from libavutil, as it's now explicit. --- src/xine-engine/buffer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/xine-engine/buffer.c') diff --git a/src/xine-engine/buffer.c b/src/xine-engine/buffer.c index bcef6df32..605fbaa09 100644 --- a/src/xine-engine/buffer.c +++ b/src/xine-engine/buffer.c @@ -36,8 +36,7 @@ #include #include -/* libavutil from FFmpeg */ -#include +#include /********** logging **********/ #define LOG_MODULE "buffer" -- cgit v1.2.3 From 8063ffb8c0b354d54834ba53b22003dac481de2c Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Wed, 9 Apr 2008 19:10:58 +0100 Subject: Compilation fixes, mostly ffmpeg-related, and linkage fixes. Tests done on amd64 with ffmpeg 0.svn20080206 from Debian experimental. libavcodec 51.50.0, libavutil 49.6.0, libpostproc 51.1.0 --- src/xine-engine/buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/xine-engine/buffer.c') diff --git a/src/xine-engine/buffer.c b/src/xine-engine/buffer.c index 605fbaa09..6b6d48a11 100644 --- a/src/xine-engine/buffer.c +++ b/src/xine-engine/buffer.c @@ -36,7 +36,7 @@ #include #include -#include +#include /********** logging **********/ #define LOG_MODULE "buffer" -- cgit v1.2.3