vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Sun Jul 10 17:36:00 2016 +0300| [f9c09233e3c549e6a9c040c8a743f511b5fd239d] | committer: Rémi Denis-Courmont
input: fix skipping data in stream-oriented access Now that stream cache and stream/access wrapper are separated the later must handle skipping data (by "reading into" a NULL buffer). This was done correctly for block-oriented plugins, but not stream-oriented ones. This patch simply adds a dummy buffer to read into in the unlikely event that it is needed. (Typically one of the stream cache plugins takes care of this, so this bug was mostly invisible.) Pointed-out-by: Filip Roséen <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f9c09233e3c549e6a9c040c8a743f511b5fd239d --- src/input/access.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/input/access.c b/src/input/access.c index e7df2ee..fff3d64 100644 --- a/src/input/access.c +++ b/src/input/access.c @@ -254,6 +254,13 @@ static ssize_t AStreamReadStream(stream_t *s, void *buf, size_t len) stream_sys_t *sys = s->p_sys; input_thread_t *input = s->p_input; ssize_t val = 0; + char dummy[(buf != NULL) ? 1 : (len <= 2048) ? len : 2048]; + + if (buf == NULL) + { + buf = dummy; + len = sizeof (dummy); + } do { _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
