author | simon <simon> | 2002-12-08 20:27:19 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-08 20:27:19 (UTC) |
commit | ec91b042d8312f83027beb357448fe02a13e8923 (patch) (side-by-side diff) | |
tree | c61b89e7fc7f22bb1dfaa19f2597c5bdae903572 | |
parent | ce313e53a56591fd883348f5e265606865fdcb50 (diff) | |
download | opie-ec91b042d8312f83027beb357448fe02a13e8923.zip opie-ec91b042d8312f83027beb357448fe02a13e8923.tar.gz opie-ec91b042d8312f83027beb357448fe02a13e8923.tar.bz2 |
- properly shut down xine in the destructor. fixes crashes when switching
skins
-rw-r--r-- | noncore/multimedia/opieplayer2/lib.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp index 4a96408..1b5fd51 100644 --- a/noncore/multimedia/opieplayer2/lib.cpp +++ b/noncore/multimedia/opieplayer2/lib.cpp @@ -107,32 +107,39 @@ Lib::Lib( XineVideoWidget* widget ) { if (m_wid != 0 ) { printf( "!0\n" ); resize ( m_wid-> size ( ) ); ::null_set_mode( m_videoOutput, qt_screen->depth(), qt_screen->pixelType() ); m_wid->repaint(); } m_queue = xine_event_new_queue (m_stream); xine_event_create_listener_thread (m_queue, xine_event_handler, this); } Lib::~Lib() { // free( m_config ); + + xine_close( m_stream ); + + xine_event_dispose_queue( m_queue ); + + xine_dispose( m_stream ); + xine_exit( m_xine ); /* FIXME either free or delete but valgrind bitches against both */ //free( m_videoOutput ); //delete m_audioOutput; } void Lib::resize ( const QSize &s ) { if ( s. width ( ) && s. height ( ) ) { ::null_set_gui_width( m_videoOutput, s. width() ); ::null_set_gui_height( m_videoOutput, s. height() ); } } int Lib::majorVersion() { int major, minor, sub; xine_get_version ( &major, &minor, &sub ); |