summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Roitzsch <mroi@users.sourceforge.net>2004-12-22 21:29:25 +0000
committerMichael Roitzsch <mroi@users.sourceforge.net>2004-12-22 21:29:25 +0000
commitde1a710b64e0c20a36f988ba01a5875fd4b43388 (patch)
tree8fd3bbe84f15b3861edfe0dff8ca1c4617d73487
parenta9392af3735dda8783da7cdda808086fdfc46682 (diff)
downloadxine-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
-rw-r--r--ChangeLog1
-rw-r--r--src/libsputext/xine_decoder.c19
2 files changed, 9 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 75522d5a7..54056ffe5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,7 @@ xine-lib
* DVB EPG: fixed incorrectly parsed running status, clear old epg data, cropped epg texts
* updated included libdvdnav: more graceful handling of some error conditions;
fixed playback of some strangely authored DVDs
+ * fixed problem with first subtitle not showing when using separate subtitle files
xine-lib (1-rc8)
* Multiple security vulnerabilities fixed on PNM and Real RTSP clients
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) {