Commit 2ce12e9e authored by Evgeny Grin's avatar Evgeny Grin Committed by Jean-Baptiste Kempf

Fix position after partial read in libc_read

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent b8171911
......@@ -578,10 +578,11 @@ static int libc_read ( dvdcss_t dvdcss, void *p_buffer, int i_blocks )
/* Handle partial reads */
if( i_ret != i_size )
{
int i_seek;
int i_seek, i_set_pos;
i_set_pos = dvdcss->i_pos + i_ret_blocks;
dvdcss->i_pos = -1;
i_seek = libc_seek( dvdcss, i_ret_blocks );
i_seek = libc_seek( dvdcss, i_set_pos );
if( i_seek < 0 )
{
return i_seek;
......
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