diff options
author | Michael Roitzsch <mroi@users.sourceforge.net> | 2004-12-22 21:29:25 +0000 |
---|---|---|
committer | Michael Roitzsch <mroi@users.sourceforge.net> | 2004-12-22 21:29:25 +0000 |
commit | de1a710b64e0c20a36f988ba01a5875fd4b43388 (patch) | |
tree | 8fd3bbe84f15b3861edfe0dff8ca1c4617d73487 /src/libsputext/xine_decoder.c | |
parent | a9392af3735dda8783da7cdda808086fdfc46682 (diff) | |
download | xine-lib-de1a710b64e0c20a36f988ba01a5875fd4b43388.tar.gz xine-lib-de1a710b64e0c20a36f988ba01a5875fd4b43388.tar.bz2 |
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
Diffstat (limited to 'src/libsputext/xine_decoder.c')
-rw-r--r-- | src/libsputext/xine_decoder.c | 19 |
1 files changed, 8 insertions, 11 deletions
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) { |