Commit 548c4b48 authored by Francois Cartegnie's avatar Francois Cartegnie Committed by 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: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent f0476f08
......@@ -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;
}
......
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