diff options
author | "Miguel Freitas ext:(%22) <miguelfreitas@users.sourceforge.net> | 2007-10-21 19:12:32 -0300 |
---|---|---|
committer | "Miguel Freitas ext:(%22) <miguelfreitas@users.sourceforge.net> | 2007-10-21 19:12:32 -0300 |
commit | 1205d480e42125d78b1d987c639e49371a35d5fe (patch) | |
tree | 1e5da74cf9fa36f9005c551b64cd6a8e7bf37bee /src | |
parent | 7ad3be0f19eeac9a3f98ba3f44f64d7b07796574 (diff) | |
download | xine-lib-1205d480e42125d78b1d987c639e49371a35d5fe.tar.gz xine-lib-1205d480e42125d78b1d987c639e49371a35d5fe.tar.bz2 |
small bugfix: make sure width/height are known before trying to use them (wait the main stream to fully initialize)
prevents division by zero in draw_subtitle().
Diffstat (limited to 'src')
-rw-r--r-- | src/libsputext/xine_sputext_decoder.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libsputext/xine_sputext_decoder.c b/src/libsputext/xine_sputext_decoder.c index 4972e4843..5d9a3c116 100644 --- a/src/libsputext/xine_sputext_decoder.c +++ b/src/libsputext/xine_sputext_decoder.c @@ -703,9 +703,11 @@ static void spudec_decode_data (spu_decoder_t *this_gen, buf_element_t *buf) { lprintf("started\n"); this->width = this->height = 0; - this->started = 1; - update_output_size( this ); + update_output_size( this ); + if( this->width && this->height ) { + this->started = 1; + } } if( this->started ) { |