Fix buggy memcpy in DstreamRead
authorMarian Ďurkovič <md@bts.sk>
Sat, 5 Sep 2009 06:57:44 +0000 (08:57 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Mon, 7 Sep 2009 19:25:45 +0000 (22:25 +0300)
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
src/input/stream_demux.c

index 69eac89..777091c 100644 (file)
@@ -162,6 +162,7 @@ static int DStreamRead( stream_t *s, void *p_read, unsigned int i_read )
             i_copy = __MIN( i_read, p_block->i_buffer );
             if( p_out && i_copy ) memcpy( p_out, p_block->p_buffer, i_copy );
             i_read -= i_copy;
+            p_out += i_copy;
             i_out += i_copy;
             p_block->i_buffer -= i_copy;
             p_block->p_buffer += i_copy;