fix uninitialized

This commit is contained in:
Glenn Maynard
2006-12-09 20:01:13 +00:00
parent 130012f3b2
commit aebfd2af2e
+2 -6
View File
@@ -828,8 +828,6 @@ bool RageSoundReader_MP3::MADLIB_rewind()
/* Returns actual position on success, 0 if past EOF, -1 on error. */ /* Returns actual position on success, 0 if past EOF, -1 on error. */
int RageSoundReader_MP3::SetPosition_toc( int iFrame, bool Xing ) int RageSoundReader_MP3::SetPosition_toc( int iFrame, bool Xing )
{ {
int percent;
ASSERT( !Xing || mad->has_xing ); ASSERT( !Xing || mad->has_xing );
ASSERT( mad->length != -1 ); ASSERT( mad->length != -1 );
@@ -837,7 +835,6 @@ int RageSoundReader_MP3::SetPosition_toc( int iFrame, bool Xing )
* if we're using Xing. */ * if we're using Xing. */
mad->timer_accurate = !Xing; mad->timer_accurate = !Xing;
if(percent >= 0)
{ {
int bytepos = -1; int bytepos = -1;
if( Xing ) if( Xing )
@@ -845,9 +842,8 @@ int RageSoundReader_MP3::SetPosition_toc( int iFrame, bool Xing )
/* We can speed up the seek using the XING tag. First, figure /* We can speed up the seek using the XING tag. First, figure
* out what percentage the requested position falls in. */ * out what percentage the requested position falls in. */
int ms = int( (iFrame * 1000LL) / SampleRate ); int ms = int( (iFrame * 1000LL) / SampleRate );
percent = ms * 100 / mad->length; int percent = ms * 100 / mad->length;
if( percent < 100 )
if( percent < 100 )
{ {
int jump = mad->xingtag.toc[percent]; int jump = mad->xingtag.toc[percent];
bytepos = mad->filesize * jump / 256; bytepos = mad->filesize * jump / 256;