[vlc-devel] big boo boo
Derk-Jan Hartman
d.hartman at student.utwente.nl
Wed Apr 30 06:13:20 CEST 2003
Something about never ending while loops.
And it has been in VLC for some time as well.
It blocks viewing http and ftp streams on MacOSX and all systems that
don't have atoll()
I fixed it, with a textbook example of an atoll function, but i'm not
sure if it's completely correct, so someone better check it ;)
2002-12-06 Friday 12:54 sam
* ./modules/access/http.c: code clean-up. removed sizeof()-1 calls
where we
meant strlen(), removed useless strcmp() calls, implemented
atoll() for
systems where it does not exist, fixed a memory leak, fixed a
minor data
corruption.
http.c
#ifdef HAVE_ATOLL
i_size = i_tell + atoll( psz_value );
#else
psz_parser = psz_value;
while( psz_parser[0] >= '0' && psz_parser[0] <= '9' )
{
i_size *= 10;
i_size += psz_parser[0] - '0';
}
i_size += i_tell;
#endif
ftp.c
#ifdef HAVE_ATOLL
p_access->i_filesize = atoll( psz_arg + 4 );
#else
{
int64_t i_size = 0;
char *psz_parser = psz_arg + 4;
while( *psz_parser == ' ' ) psz_parser++;
while( psz_parser[0] >= '0' && psz_parser[0] <= '9' )
{
i_size *= 10;
i_size += psz_parser[0] - '0';
}
p_access->i_filesize = i_size;
}
#endif
---
Videolan - VLC media player
Derk-Jan Hartman (thedj at users.sourceforge.net)
Co-Developer of the MacOS X port of vlc
http://www.videolan.org/vlc
--
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>
More information about the vlc-devel
mailing list