summaryrefslogtreecommitdiff
path: root/src/xine-engine/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xine-engine/buffer.c')
-rw-r--r--src/xine-engine/buffer.c8
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;
}