From 1205d480e42125d78b1d987c639e49371a35d5fe Mon Sep 17 00:00:00 2001 From: "\"Miguel Freitas ext:(%22)" Date: Sun, 21 Oct 2007 19:12:32 -0300 Subject: 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(). --- ChangeLog | 1 + src/libsputext/xine_sputext_decoder.c | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b02a70b6e..781c5c6ed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 ) { -- cgit v1.2.3