From aebfd2af2e569ffced579ca0895dc083d6de4656 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 9 Dec 2006 20:01:13 +0000 Subject: [PATCH] fix uninitialized --- stepmania/src/RageSoundReader_MP3.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/stepmania/src/RageSoundReader_MP3.cpp b/stepmania/src/RageSoundReader_MP3.cpp index c755c65f6a..fc20d2104d 100644 --- a/stepmania/src/RageSoundReader_MP3.cpp +++ b/stepmania/src/RageSoundReader_MP3.cpp @@ -828,8 +828,6 @@ bool RageSoundReader_MP3::MADLIB_rewind() /* Returns actual position on success, 0 if past EOF, -1 on error. */ int RageSoundReader_MP3::SetPosition_toc( int iFrame, bool Xing ) { - int percent; - ASSERT( !Xing || mad->has_xing ); ASSERT( mad->length != -1 ); @@ -837,7 +835,6 @@ int RageSoundReader_MP3::SetPosition_toc( int iFrame, bool Xing ) * if we're using Xing. */ mad->timer_accurate = !Xing; - if(percent >= 0) { int bytepos = -1; 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 * out what percentage the requested position falls in. */ int ms = int( (iFrame * 1000LL) / SampleRate ); - percent = ms * 100 / mad->length; - - if( percent < 100 ) + int percent = ms * 100 / mad->length; + if( percent < 100 ) { int jump = mad->xingtag.toc[percent]; bytepos = mad->filesize * jump / 256;