summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/lib.cpp23
1 files changed, 21 insertions, 2 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp
index f1b9773..6ed4cea 100644
--- a/noncore/multimedia/opieplayer2/lib.cpp
+++ b/noncore/multimedia/opieplayer2/lib.cpp
@@ -132,4 +132,5 @@ void Lib::initialize()
m_stream = xine_stream_new (m_xine, m_audioOutput, m_videoOutput );
+ xine_set_param( m_stream, XINE_PARAM_AUDIO_CLOSE_DEVICE, 1);
if (m_wid != 0 )
@@ -203,4 +204,5 @@ void Lib::stop() {
assert( m_initialized );
xine_stop( m_stream );
+ xine_set_param( m_stream, XINE_PARAM_AUDIO_CLOSE_DEVICE, 1);
}
@@ -208,5 +210,12 @@ void Lib::pause( bool toggle ) {
assert( m_initialized );
- xine_set_param( m_stream, XINE_PARAM_SPEED, toggle ? XINE_SPEED_PAUSE : XINE_SPEED_NORMAL );
+ if ( toggle ) {
+ xine_set_param( m_stream, XINE_PARAM_SPEED, XINE_SPEED_PAUSE );
+ xine_set_param( m_stream, XINE_PARAM_AUDIO_CLOSE_DEVICE, 1);
+ }
+
+ else {
+ xine_set_param( m_stream, XINE_PARAM_SPEED, XINE_SPEED_NORMAL );
+ }
}
@@ -283,5 +292,15 @@ void Lib::seekTo( int time ) {
assert( m_initialized );
- xine_play( m_stream, 0, time*1000 );
+ odebug << "Seeking to second " << time << oendl;
+ //Keep it paused if it was in that state
+ if ( xine_get_param( m_stream, XINE_PARAM_SPEED ) ) {
+ xine_play( m_stream, 0, time*1000 );
+ }
+
+ else {
+ xine_play( m_stream, 0, time*1000 );
+ xine_set_param( m_stream, XINE_PARAM_SPEED, XINE_SPEED_PAUSE );
+ }
+
}