summaryrefslogtreecommitdiff
authorsimon <simon>2002-12-13 22:57:50 (UTC)
committer simon <simon>2002-12-13 22:57:50 (UTC)
commit5325a761bb662c7cf6301ed6a03113869ef4c95f (patch) (side-by-side diff)
treebdb521d3e89062f658db729004cedfe9adbf1c49
parent739ab075c31b96edf42d2987492cfe950ea1f5e8 (diff)
downloadopie-5325a761bb662c7cf6301ed6a03113869ef4c95f.zip
opie-5325a761bb662c7cf6301ed6a03113869ef4c95f.tar.gz
opie-5325a761bb662c7cf6301ed6a03113869ef4c95f.tar.bz2
- oops #2
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/lib.cpp5
-rw-r--r--noncore/multimedia/opieplayer2/lib.h1
2 files changed, 5 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp
index 040eab3..cef46a1 100644
--- a/noncore/multimedia/opieplayer2/lib.cpp
+++ b/noncore/multimedia/opieplayer2/lib.cpp
@@ -70,12 +70,13 @@ extern "C" {
using namespace XINE;
Lib::Lib( InitializationMode initMode, XineVideoWidget* widget )
{
m_initialized = false;
+ m_duringInitialization = false;
m_video = false;
m_wid = widget;
printf("Lib");
QString configPath = QDir::homeDirPath() + "/Settings/opiexine.cf";
// get the configuration
@@ -100,12 +101,13 @@ void Lib::run()
{
assert( false );
}
void Lib::initialize()
{
+ m_duringInitialization = true;
m_xine = xine_new( );
QString configPath = QDir::homeDirPath() + "/Settings/opiexine.cf";
xine_config_load( m_xine, QFile::encodeName( configPath ) );
xine_init( m_xine );
@@ -131,12 +133,13 @@ void Lib::initialize()
// m_wid->repaint();
}
m_queue = xine_event_new_queue (m_stream);
xine_event_create_listener_thread (m_queue, xine_event_handler, this);
+ m_duringInitialization = false;
}
Lib::~Lib() {
assert( isRunning() == false );
assert( m_initialized );
@@ -152,13 +155,13 @@ Lib::~Lib() {
/* FIXME either free or delete but valgrind bitches against both */
//free( m_videoOutput );
//delete m_audioOutput;
}
void Lib::resize ( const QSize &s ) {
- assert( m_initialized );
+ assert( m_initialized || m_duringInitialization );
if ( s. width ( ) && s. height ( ) ) {
::null_set_gui_width( m_videoOutput, s. width() );
::null_set_gui_height( m_videoOutput, s. height() );
}
}
diff --git a/noncore/multimedia/opieplayer2/lib.h b/noncore/multimedia/opieplayer2/lib.h
index 7e3a912..9dd7385 100644
--- a/noncore/multimedia/opieplayer2/lib.h
+++ b/noncore/multimedia/opieplayer2/lib.h
@@ -190,12 +190,13 @@ namespace XINE {
private:
void initialize();
int m_bytes_per_pixel;
bool m_initialized:1;
+ bool m_duringInitialization:1;
bool m_video:1;
XineVideoWidget *m_wid;
xine_t *m_xine;
xine_stream_t *m_stream;
xine_cfg_entry_t *m_config;
xine_vo_driver_t *m_videoOutput;