changeset 7115:55716603988c

fixes problems when new line is just '\n' and not '\r\n' and enabled html-markup ignore. Patch by Piotr Krukowiecki <piotr@pingu.ii.uj.edu.pl>
author alex
date Wed, 28 Aug 2002 17:07:55 +0000
parents 79187bd813a6
children e751a2b0991d
files libmpdemux/demux_ogg.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_ogg.c	Wed Aug 28 16:55:40 2002 +0000
+++ b/libmpdemux/demux_ogg.c	Wed Aug 28 17:07:55 2002 +0000
@@ -164,7 +164,7 @@
     lcv = 3;
     while (1) {
       int c = packet[lcv++];
-      if(c=='\r' || c==0 || line_pos >= OGG_SUB_MAX_LINE-1){
+      if(c=='\n' || c==0 || line_pos >= OGG_SUB_MAX_LINE-1){
 	  ogg_sub.text[ogg_sub.lines][line_pos] = 0; // close sub
           if(line_pos) ogg_sub.lines++;
 	  if(!c || ogg_sub.lines>=SUB_MAX_TEXT) break; // EOL or TooMany
@@ -182,7 +182,7 @@
           ignoring = 0;
           break;
         default:
-          //if(!ignoring) 
+          if(!ignoring) 
 	  ogg_sub.text[ogg_sub.lines][line_pos++] = c;
           break;
       }