read_stream_list() expects it to be zeroed to avoid a second call to
end_stream().
if (ctx->cur_stream_offset == ctx->cur_stream->size) {
/* Finished reading all the data for a stream. */
if (ctx->cur_stream_offset == ctx->cur_stream->size) {
/* Finished reading all the data for a stream. */
+ ctx->cur_stream_offset = 0;
+
DEBUG("End stream (size=%"PRIu64").", ctx->cur_stream->size);
ret = (*ctx->cbs.end_stream)(ctx->cur_stream, 0,
ctx->cbs.end_stream_ctx);
DEBUG("End stream (size=%"PRIu64").", ctx->cur_stream->size);
ret = (*ctx->cbs.end_stream)(ctx->cur_stream, 0,
ctx->cbs.end_stream_ctx);
else
ctx->next_stream = NULL;
}
else
ctx->next_stream = NULL;
}
- ctx->cur_stream_offset = 0;