From 7bc932abc8e6e237b1c2c94d06e050d6aa0ef902 Mon Sep 17 00:00:00 2001 From: laaz Date: Sat, 12 Jan 2002 00:02:52 +0000 Subject: fixed mpsub bug requested by Gabucino git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4099 b3059339-0415-0410-9bf9-f77b7e298cf2 --- subreader.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'subreader.c') diff --git a/subreader.c b/subreader.c index aaca473625..1bbdea9206 100644 --- a/subreader.c +++ b/subreader.c @@ -404,7 +404,10 @@ subtitle *sub_read_line_mpsub(FILE *fd, subtitle *current) { current->end=(int) mpsub_position; while (num < SUB_MAX_TEXT) { - if (!fgets (line, LINE_LEN, fd)) return NULL; + if (!fgets (line, LINE_LEN, fd)) { + if (num == 0) return NULL; + else return current; + } p=line; while (isspace(*p)) p++; if (eol(*p) && num > 0) return current; @@ -414,7 +417,7 @@ subtitle *sub_read_line_mpsub(FILE *fd, subtitle *current) { *q='\0'; if (strlen(p)) { current->text[num]=strdup(p); - printf (">%s<\n",p); +// printf (">%s<\n",p); current->lines = ++num; } else { if (num) return current; -- cgit v1.2.3