diff options
author | Andreas Heinchen <heinchen@users.sourceforge.net> | 2003-04-26 13:46:47 +0000 |
---|---|---|
committer | Andreas Heinchen <heinchen@users.sourceforge.net> | 2003-04-26 13:46:47 +0000 |
commit | 94f9588a28e1974533377884677ca9e82ed59a99 (patch) | |
tree | e11e94e444718da4cef6679c50824bfb722158ed | |
parent | 4512747c7cf9b1109c0b2f182370fc23d279613d (diff) | |
download | xine-lib-94f9588a28e1974533377884677ca9e82ed59a99.tar.gz xine-lib-94f9588a28e1974533377884677ca9e82ed59a99.tar.bz2 |
fix multiple lines subtitles' display in OGM container
CVS patchset: 4682
CVS date: 2003/04/26 13:46:47
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/libsputext/xine_decoder_ogm.c | 16 |
2 files changed, 9 insertions, 8 deletions
@@ -1,4 +1,5 @@ xine-lib (1-beta11) + * fix multiple lines subtitles' display in OGM container * fix fastforward bug (slow playback with unused cpu cicles) * fix input_net (tcp) seeking * network input plugins do not freeze when no data is available diff --git a/src/libsputext/xine_decoder_ogm.c b/src/libsputext/xine_decoder_ogm.c index 06f5688d4..fa144b75d 100644 --- a/src/libsputext/xine_decoder_ogm.c +++ b/src/libsputext/xine_decoder_ogm.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_ogm.c,v 1.1 2003/04/16 23:06:38 heinchen Exp $ + * $Id: xine_decoder_ogm.c,v 1.2 2003/04/26 13:46:48 heinchen Exp $ * */ @@ -293,23 +293,23 @@ static void spudec_decode_data (spu_decoder_t *this_gen, buf_element_t *buf) { this->lines=0; - i=0; + while (i<strlen(str)+1) { - switch (str[i]) { - case 13: - str=&str[i+1]; + if(str[i]=='\r' || str[i]=='\n') { + if(str[i+1]=='\n' && str[i]=='\r') str=str+i+2; + else str=str+i+1; this->text[ this->lines ][i]=0; this->lines=this->lines+1; i=0; - break; - default: + if(this->lines>=SUB_MAX_TEXT) break; + } else { this->text[ this->lines ][i]=str[i]; if (i<SUB_BUFSIZE-1) i++; } } - + #ifdef LOG printf("libspuogm: decoder data [%s]\n", this->text[0]); printf("libspuogm: timing %d->%d\n", start, end); |