stream: stream_reset
We can reuse the same stream by resetting it. We don't delete the cached data.
This commit is contained in:
@@ -100,6 +100,13 @@ stream_err_t stream_init_file(stream_t *stream, const char *name, FILE *pipe)
|
||||
return STREAM_ERR_OK;
|
||||
}
|
||||
|
||||
void stream_reset(stream_t *stream)
|
||||
{
|
||||
if (!stream)
|
||||
return;
|
||||
stream->position = 0;
|
||||
}
|
||||
|
||||
void stream_stop(stream_t *stream)
|
||||
{
|
||||
if (!stream)
|
||||
|
||||
Reference in New Issue
Block a user