From 775c694abe5e84d66e448864c0281bf569bf509c Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Sun, 14 Jul 2002 22:27:24 +0000 Subject: make demuxers a bit more "programmer friendly" CVS patchset: 2265 CVS date: 2002/07/14 22:27:24 --- src/xine-engine/buffer.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/xine-engine/buffer.c') diff --git a/src/xine-engine/buffer.c b/src/xine-engine/buffer.c index b69752e85..5b9c83dff 100644 --- a/src/xine-engine/buffer.c +++ b/src/xine-engine/buffer.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: buffer.c,v 1.16 2002/03/24 14:15:37 guenter Exp $ + * $Id: buffer.c,v 1.17 2002/07/14 22:27:24 miguelfreitas Exp $ * * * contents: @@ -103,6 +103,12 @@ static buf_element_t *buffer_pool_alloc (fifo_buffer_t *this) { /* needed because cancellation points defined by POSIX (eg. 'read') would leak allocated buffers */ pthread_setcancelstate(PTHREAD_CANCEL_DISABLE,NULL); + + /* set sane values to the newly allocated buffer */ + buf->content = buf->mem; /* 99% of demuxers will want this */ + buf->pts = 0; + buf->input_pos = buf->input_length = buf->input_time = 0; + buf->decoder_flags = 0; return buf; } -- cgit v1.2.3