diff options
author | Michael Roitzsch <mroi@users.sourceforge.net> | 2003-12-24 17:34:49 +0000 |
---|---|---|
committer | Michael Roitzsch <mroi@users.sourceforge.net> | 2003-12-24 17:34:49 +0000 |
commit | 1eef214e78f1d3cfe29a922a60642b0a3e4c5433 (patch) | |
tree | 926671cbe066431a58c02def339a064ebc66031f | |
parent | 875b71e7f35c15b6f86c9b8183d24aa2a941123d (diff) | |
download | xine-lib-1eef214e78f1d3cfe29a922a60642b0a3e4c5433.tar.gz xine-lib-1eef214e78f1d3cfe29a922a60642b0a3e4c5433.tar.bz2 |
* patch by David Gómez to support linebreaking '|' in subview format
* fix compiler warnings
CVS patchset: 5947
CVS date: 2003/12/24 17:34:49
-rw-r--r-- | src/libsputext/demux_sputext.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/libsputext/demux_sputext.c b/src/libsputext/demux_sputext.c index f322a70a7..c7a647ffa 100644 --- a/src/libsputext/demux_sputext.c +++ b/src/libsputext/demux_sputext.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: demux_sputext.c,v 1.31 2003/12/17 13:41:05 valtri Exp $ + * $Id: demux_sputext.c,v 1.32 2003/12/24 17:34:49 mroi Exp $ * * code based on old libsputext/xine_decoder.c * @@ -322,13 +322,14 @@ static subtitle_t *sub_read_line_subviewer(demux_sputext_t *this, subtitle_t *cu p=q=line; for (current->lines=1; current->lines < SUB_MAX_TEXT; current->lines++) { - for (q=p,len=0; *p && *p!='\r' && *p!='\n' && strncasecmp(p,"[br]",4); p++,len++); + for (q=p,len=0; *p && *p!='\r' && *p!='\n' && *p!='|' && strncasecmp(p,"[br]",4); p++,len++); current->text[current->lines-1]=(char *)xine_xmalloc (len+1); if (!current->text[current->lines-1]) return ERR; strncpy (current->text[current->lines-1], q, len); current->text[current->lines-1][len]='\0'; if (!*p || *p=='\r' || *p=='\n') break; - while (*p++!=']'); + if (*p=='[') while (*p++!=']'); + if (*p=='|') p++; } break; } @@ -630,7 +631,7 @@ static subtitle_t *sub_read_line_aqt (demux_sputext_t *this, subtitle_t *current return current; } -subtitle_t *sub_read_line_jacobsub(demux_sputext_t *this, subtitle_t *current) { +static subtitle_t *sub_read_line_jacobsub(demux_sputext_t *this, subtitle_t *current) { char line1[LINE_LEN], line2[LINE_LEN], directive[LINE_LEN], *p, *q; unsigned a1, a2, a3, a4, b1, b2, b3, b4, comment = 0; static unsigned jacoTimeres = 30; @@ -828,7 +829,7 @@ subtitle_t *sub_read_line_jacobsub(demux_sputext_t *this, subtitle_t *current) { return current; } -subtitle_t *sub_read_line_subviewer2(demux_sputext_t *this, subtitle_t *current) { +static subtitle_t *sub_read_line_subviewer2(demux_sputext_t *this, subtitle_t *current) { char line[LINE_LEN+1]; int a1,a2,a3,a4; char *p=NULL; |