From de1a710b64e0c20a36f988ba01a5875fd4b43388 Mon Sep 17 00:00:00 2001 From: Michael Roitzsch Date: Wed, 22 Dec 2004 21:29:25 +0000 Subject: calling update_output_size() right before actually showing the subtitle will fix problems, when the size of the output area changed between the initial call and the drawing (which might be in the magnitude of seconds or minutes caused by _x_spu_decoder_sleep(), especially when using separate text subtitles); this caused the first subtitle to be missing sometimes, because users would switch to fullscreen after starting playback also fix missing first subtitle after seeking (reset of decoders tate was incomplete) CVS patchset: 7294 CVS date: 2004/12/22 21:29:25 --- src/libsputext/xine_decoder.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/libsputext/xine_decoder.c b/src/libsputext/xine_decoder.c index 4b2a4e055..cf3c90252 100644 --- a/src/libsputext/xine_decoder.c +++ b/src/libsputext/xine_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_decoder.c,v 1.87 2004/12/12 22:01:11 mroi Exp $ + * $Id: xine_decoder.c,v 1.88 2004/12/22 21:29:26 mroi Exp $ * */ @@ -741,11 +741,6 @@ static void spudec_decode_data (spu_decoder_t *this_gen, buf_element_t *buf) { start_vpts = extra_info.vpts + diff * this->img_duration; end_vpts = start_vpts + (end-start) * this->img_duration; - _x_spu_decoder_sleep(this->stream, start_vpts); - draw_subtitle(this, start_vpts, end_vpts); - - return; - } else { if( !uses_time ) { @@ -767,12 +762,13 @@ static void spudec_decode_data (spu_decoder_t *this_gen, buf_element_t *buf) { start_vpts = extra_info.vpts + diff * 90; end_vpts = start_vpts + (end-start) * 90; - - _x_spu_decoder_sleep(this->stream, start_vpts); - draw_subtitle(this, start_vpts, end_vpts); - - return; } + + _x_spu_decoder_sleep(this->stream, start_vpts); + update_output_size( this ); + draw_subtitle(this, start_vpts, end_vpts); + + return; } } @@ -790,6 +786,7 @@ static void spudec_reset (spu_decoder_t *this_gen) { lprintf("i guess we just seeked\n"); this->width = this->height = 0; this->started = this->finished = 0; + this->last_subtitle_end = 0; } static void spudec_discontinuity (spu_decoder_t *this_gen) { -- cgit v1.2.3