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 | |
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().
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/libsputext/xine_sputext_decoder.c | 6 |
2 files changed, 5 insertions, 2 deletions
@@ -8,6 +8,7 @@ xine-lib (1.1.9) (unreleased) * Improve syncing of audio and video in the presence of bad frames. * Improve handling of invalid or unknown frame sizes. * Fixed handling of streamed Flash videos (broken in 1.1.5). + * Fixed division by zero in sputext decoder xine-lib (1.1.8) * Send a channel-changed event to the frontend when receiving the SYNC 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 ) { |