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(). --- src/libsputext/xine_sputext_decoder.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') 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