diff options
author | phintuka <phintuka> | 2008-07-11 18:09:36 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2008-07-11 18:09:36 +0000 |
commit | 5094fa84acb7207fea4faf0f4f105ecf1284a0ef (patch) | |
tree | 41a6f6be4492085f846f8b3dc0eb7880952681b4 | |
parent | aea1d1466976a6ae8b3aa276b96e8e3c95ea2678 (diff) | |
download | xineliboutput-5094fa84acb7207fea4faf0f4f105ecf1284a0ef.tar.gz xineliboutput-5094fa84acb7207fea4faf0f4f105ecf1284a0ef.tar.bz2 |
Sync fifo_buffer_new with current xine-lib 1.2 hg
(xine_xmalloc_aligned -> av_mallocz)
-rw-r--r-- | xine_input_vdr.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/xine_input_vdr.c b/xine_input_vdr.c index 1b1f4351..c52e5372 100644 --- a/xine_input_vdr.c +++ b/xine_input_vdr.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xine_input_vdr.c,v 1.162 2008-07-11 18:07:43 phintuka Exp $ + * $Id: xine_input_vdr.c,v 1.163 2008-07-11 18:09:36 phintuka Exp $ * */ @@ -40,6 +40,10 @@ # include <scsi/sg.h> #endif +#if XINE_VERSION_CODE >= 10190 +# include <libavutil/mem.h> +#endif + #include <xine/xine_internal.h> #include <xine/xineutils.h> #include <xine/input_plugin.h> @@ -1384,7 +1388,6 @@ static fifo_buffer_t *fifo_buffer_new (xine_stream_t *stream, int num_buffers, u fifo_buffer_t *ref = stream->video_fifo; fifo_buffer_t *this; int i; - int alignment = 2048; unsigned char *multi_buffer = NULL; LOGDBG("fifo_buffer_new..."); @@ -1414,11 +1417,7 @@ static fifo_buffer_t *fifo_buffer_new (xine_stream_t *stream, int num_buffers, u * init buffer pool, allocate nNumBuffers of buf_size bytes each */ - if (buf_size % alignment != 0) - buf_size += alignment - (buf_size % alignment); - - 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); pthread_mutex_init (&this->buffer_pool_mutex, NULL); pthread_cond_init (&this->buffer_pool_cond_not_empty, NULL); |