summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/loopcontrol.cpp10
1 files changed, 5 insertions, 5 deletions
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
@@ -360,16 +360,16 @@ bool LoopControl::init( const QString& filename ) {
current_frame = total_video_frames = total_audio_samples = 0;
qDebug( "Using the %s decoder", mediaPlayerState->curDecoder()->pluginName() );
// ### 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 ) ) {
audioMutex->unlock();
return FALSE;
}
@@ -383,13 +383,13 @@ bool LoopControl::init( const QString& filename ) {
channels = mediaPlayerState->curDecoder()->audioChannels( astream );
qDebug( "LC- channels = %d", channels );
if ( !total_audio_samples )
total_audio_samples = mediaPlayerState->curDecoder()->audioSamples( astream );
-// total_audio_samples += 1000;
+ total_audio_samples += 1000;
mediaPlayerState->setLength( total_audio_samples );
freq = mediaPlayerState->curDecoder()->audioFrequency( astream );
qDebug( "LC- frequency = %d", freq );