summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/mediaplayer.cpp
authorsimon <simon>2002-12-13 23:28:19 (UTC)
committer simon <simon>2002-12-13 23:28:19 (UTC)
commit46888759da1aea08ef4b5ebdbaee7c10faaecc70 (patch) (side-by-side diff)
tree50120eb119daf39cda2c3168f710eff5a8855117 /noncore/multimedia/opieplayer2/mediaplayer.cpp
parent1830ae3069a3ca35df678ce6d1700bf31d968a5c (diff)
downloadopie-46888759da1aea08ef4b5ebdbaee7c10faaecc70.zip
opie-46888759da1aea08ef4b5ebdbaee7c10faaecc70.tar.gz
opie-46888759da1aea08ef4b5ebdbaee7c10faaecc70.tar.bz2
- activate the threaded xine init code! :)
Diffstat (limited to 'noncore/multimedia/opieplayer2/mediaplayer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayer.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp
index d6fbb53..0ec6fad 100644
--- a/noncore/multimedia/opieplayer2/mediaplayer.cpp
+++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp
@@ -37,2 +37,3 @@ MediaPlayer::MediaPlayer( PlayListWidget &_playList, MediaPlayerState &_mediaPla
m_xineControl = 0;
+ xine = new XINE::Lib( XINE::Lib::InitializeInThread );
@@ -67,2 +68,7 @@ MediaPlayer::MediaPlayer( PlayListWidget &_playList, MediaPlayerState &_mediaPla
MediaPlayer::~MediaPlayer() {
+ // this shold never happen, but one never knows...
+ if ( xine ) {
+ xine->ensureInitialized();
+ delete xine;
+ }
delete m_xineControl;
@@ -373,4 +379,8 @@ void MediaPlayer::recreateAudioAndVideoWidgets() const
- XINE::Lib *xine = new XINE::Lib( XINE::Lib::InitializeImmediately );
+ if ( !xine )
+ xine = new XINE::Lib( XINE::Lib::InitializeImmediately );
+
m_xineControl = new XineControl( xine, m_videoUI->vidWidget(), mediaPlayerState );
+
+ xine = 0;
}