forked from KolibriOS/kolibrios
libmpg123 1.15.4
git-svn-id: svn://kolibrios.org@3960 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -105,6 +105,26 @@ void fi_add(struct frame_index *fi, off_t pos)
|
||||
}
|
||||
}
|
||||
|
||||
int fi_set(struct frame_index *fi, off_t *offsets, off_t step, size_t fill)
|
||||
{
|
||||
if(fi_resize(fi, fill) == -1) return -1;
|
||||
fi->step = step;
|
||||
if(offsets != NULL)
|
||||
{
|
||||
memcpy(fi->data, offsets, fill*sizeof(off_t));
|
||||
fi->fill = fill;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* allocation only, no entries in index yet */
|
||||
fi->fill = 0;
|
||||
}
|
||||
fi->next = fi_next(fi);
|
||||
debug3("set new index of fill %lu, size %lu at %p",
|
||||
(unsigned long)fi->fill, (unsigned long)fi->size, (void*)fi->data);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void fi_reset(struct frame_index *fi)
|
||||
{
|
||||
debug1("reset with size %"SIZE_P, (size_p)fi->size);
|
||||
|
Reference in New Issue
Block a user