[vlc-commits] access: load cache stream filter explicitly
Rémi Denis-Courmont
git at videolan.org
Tue Aug 25 20:33:18 CEST 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Aug 25 21:08:22 2015 +0300| [75b855919fce926b384c121ef640e0eeaf050181] | committer: Rémi Denis-Courmont
access: load cache stream filter explicitly
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=75b855919fce926b384c121ef640e0eeaf050181
---
src/input/access.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/input/access.c b/src/input/access.c
index 8a42973..25a20b3 100644
--- a/src/input/access.c
+++ b/src/input/access.c
@@ -375,15 +375,26 @@ stream_t *stream_AccessNew(vlc_object_t *parent, input_thread_t *input,
sys->block = NULL;
- s->p_sys = sys;
+ const char *cachename = NULL;
+
if (sys->access->pf_block != NULL)
+ {
s->pf_read = AStreamReadBlock;
+ cachename = "cache_block";
+ }
else
+ if (sys->access->pf_read != NULL)
+ {
s->pf_read = AStreamReadStream;
+ cachename = "cache_read";
+ }
s->pf_readdir = AStreamReadDir;
s->pf_control = AStreamControl;
s->pf_destroy = AStreamDestroy;
+ s->p_sys = sys;
+ if (cachename != NULL)
+ s = stream_FilterChainNew(s, cachename);
return s;
error:
free(sys);
More information about the vlc-commits
mailing list