vlc/vlc-2.2 | branch: master | Francois Cartegnie <fcvlc...@free.fr> | Mon Sep 29 20:06:05 2014 +0200| [548c4b482705ee4e809c4abea2406a01a415d786] | committer: Jean-Baptiste Kempf
input: stream_memory: handle skip reads Regular streams skip if p_read is NULL. (cherry picked from commit 426d82731aa74530af562c3fa09ce7a2eeb45c6a) Signed-off-by: Jean-Baptiste Kempf <j...@videolan.org> > http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=548c4b482705ee4e809c4abea2406a01a415d786 --- src/input/stream_memory.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/input/stream_memory.c b/src/input/stream_memory.c index 491ab02..25caa2e 100644 --- a/src/input/stream_memory.c +++ b/src/input/stream_memory.c @@ -157,7 +157,8 @@ static int Read( stream_t *s, void *p_read, unsigned int i_read ) { stream_sys_t *p_sys = s->p_sys; int i_res = __MIN( i_read, p_sys->i_size - p_sys->i_pos ); - memcpy( p_read, p_sys->p_buffer + p_sys->i_pos, i_res ); + if ( p_read ) + memcpy( p_read, p_sys->p_buffer + p_sys->i_pos, i_res ); p_sys->i_pos += i_res; return i_res; } _______________________________________________ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits