diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-07-14 22:27:24 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-07-14 22:27:24 +0000 |
commit | 775c694abe5e84d66e448864c0281bf569bf509c (patch) | |
tree | 8829d985ba94742b6877b3cf375aef3257c361da /src/xine-engine/buffer.c | |
parent | 43926fa28a72a0593f97b9e5718172ce26f27612 (diff) | |
download | xine-lib-775c694abe5e84d66e448864c0281bf569bf509c.tar.gz xine-lib-775c694abe5e84d66e448864c0281bf569bf509c.tar.bz2 |
make demuxers a bit more "programmer friendly"
CVS patchset: 2265
CVS date: 2002/07/14 22:27:24
Diffstat (limited to 'src/xine-engine/buffer.c')
-rw-r--r-- | src/xine-engine/buffer.c | 8 |
1 files changed, 7 insertions, 1 deletions
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; } |