Exemple #1
0
static int feed_init(mpg123_handle *fr)
{
	bc_init(&fr->rdat.buffer);
	bc_fill_pool(&fr->rdat.buffer);
	fr->rdat.filelen = 0;
	fr->rdat.filepos = 0;
	fr->rdat.flags |= READER_BUFFERED;
	return 0;
}
Exemple #2
0
static void bc_reset(struct bufferchain *bc)
{
	/* Free current chain, possibly stuffing back into the pool. */
	while(bc->first)
	{
		struct buffy* buf = bc->first;
		bc->first = buf->next;
		bc_free(bc, buf);
	}
	bc_fill_pool(bc); /* Ignoring an error here... */
	bc_init(bc);
}
Exemple #3
0
static void bc_reset( bufferchain_t *bc )
{
	// free current chain, possibly stuffing back into the pool.
	while( bc->first )
	{
		buffy_t *buf = bc->first;
		bc->first = buf->next;
		bc_free( bc, buf );
	}

	bc_fill_pool( bc );	// ignoring an error here...
	bc_init( bc );
}