From ac943f379a7b46967d8a1c4322f4f733b3771064 Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 28 Aug 2002 17:07:55 +0000 Subject: [PATCH] fixes problems when new line is just '\n' and not '\r\n' and enabled html-markup ignore. Patch by Piotr Krukowiecki git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7116 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/demux_ogg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libmpdemux/demux_ogg.c b/libmpdemux/demux_ogg.c index d732cdf9c3..9248095803 100644 --- a/libmpdemux/demux_ogg.c +++ b/libmpdemux/demux_ogg.c @@ -164,7 +164,7 @@ void demux_ogg_add_sub (char* packet) { 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 @@ void demux_ogg_add_sub (char* packet) { ignoring = 0; break; default: - //if(!ignoring) + if(!ignoring) ogg_sub.text[ogg_sub.lines][line_pos++] = c; break; }