Commit 75b85591 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

access: load cache stream filter explicitly

parent daf5ccc4
...@@ -375,15 +375,26 @@ stream_t *stream_AccessNew(vlc_object_t *parent, input_thread_t *input, ...@@ -375,15 +375,26 @@ stream_t *stream_AccessNew(vlc_object_t *parent, input_thread_t *input,
sys->block = NULL; sys->block = NULL;
s->p_sys = sys; const char *cachename = NULL;
if (sys->access->pf_block != NULL) if (sys->access->pf_block != NULL)
{
s->pf_read = AStreamReadBlock; s->pf_read = AStreamReadBlock;
cachename = "cache_block";
}
else else
if (sys->access->pf_read != NULL)
{
s->pf_read = AStreamReadStream; s->pf_read = AStreamReadStream;
cachename = "cache_read";
}
s->pf_readdir = AStreamReadDir; s->pf_readdir = AStreamReadDir;
s->pf_control = AStreamControl; s->pf_control = AStreamControl;
s->pf_destroy = AStreamDestroy; s->pf_destroy = AStreamDestroy;
s->p_sys = sys;
if (cachename != NULL)
s = stream_FilterChainNew(s, cachename);
return s; return s;
error: error:
free(sys); free(sys);
......
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