Commit 6a3c9b1d authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

prefetch: add support for block-based accesses

This still requires memory copying, but at least it does not introduce
timing issues.
parent b75462c3
......@@ -92,7 +92,7 @@ static int ThreadRead(stream_t *stream, size_t length)
char *p = sys->buffer + (sys->buffer_offset % sys->buffer_size)
+ sys->buffer_length;
ssize_t val = vlc_stream_Read(stream->p_source, p, length);
ssize_t val = vlc_stream_ReadPartial(stream->p_source, p, length);
if (val < 0)
msg_Err(stream, "cannot read data (at offset %"PRIu64")",
......
......@@ -317,7 +317,7 @@ stream_t *stream_AccessNew(vlc_object_t *parent, input_thread_t *input,
if (access->pf_block != NULL)
{
s->pf_block = AStreamReadBlock;
cachename = "cache_block";
cachename = "prefetch,cache_block";
}
else
if (access->pf_read != NULL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment