From 4cd02e41953be5b271c877197cf9c12ad4785bef Mon Sep 17 00:00:00 2001 From: llornkcor Date: Sun, 05 May 2002 18:09:38 +0000 Subject: bug fix --- diff --git a/core/multimedia/opieplayer/loopcontrol.cpp b/core/multimedia/opieplayer/loopcontrol.cpp index faa8e56..310d512 100644 --- a/core/multimedia/opieplayer/loopcontrol.cpp +++ b/core/multimedia/opieplayer/loopcontrol.cpp @@ -363,10 +363,10 @@ bool LoopControl::init( const QString& filename ) { // ### Hack to use libmpeg3plugin to get the number of audio samples if we are using the libmad plugin if ( mediaPlayerState->curDecoder()->pluginName() == QString("LibMadPlugin") ) { - if ( mediaPlayerState->libMpeg3Decoder() && mediaPlayerState->libMpeg3Decoder()->open( filename ) ) { - total_audio_samples = mediaPlayerState->libMpeg3Decoder()->audioSamples( 0 ); - mediaPlayerState->libMpeg3Decoder()->close(); - } + if ( mediaPlayerState->libMpeg3Decoder() && mediaPlayerState->libMpeg3Decoder()->open( filename )) { + total_audio_samples = mediaPlayerState->libMpeg3Decoder()->audioSamples( 0 ); + mediaPlayerState->libMpeg3Decoder()->close(); + } } if ( !mediaPlayerState->curDecoder()|| !mediaPlayerState->curDecoder()->open( filename ) ) { @@ -386,7 +386,7 @@ bool LoopControl::init( const QString& filename ) { if ( !total_audio_samples ) total_audio_samples = mediaPlayerState->curDecoder()->audioSamples( astream ); -// total_audio_samples += 1000; + total_audio_samples += 1000; mediaPlayerState->setLength( total_audio_samples ); -- cgit v0.9.0.2