diff options
author | laaz <laaz@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-01-12 00:02:52 +0000 |
---|---|---|
committer | laaz <laaz@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-01-12 00:02:52 +0000 |
commit | 7bc932abc8e6e237b1c2c94d06e050d6aa0ef902 (patch) | |
tree | c2f0df24932bfd168f0fe85555f65f7576eb5927 | |
parent | d9ff2768db64ba34f0f44e0b0934901440ae0129 (diff) | |
download | mpv-7bc932abc8e6e237b1c2c94d06e050d6aa0ef902.tar.bz2 mpv-7bc932abc8e6e237b1c2c94d06e050d6aa0ef902.tar.xz |
fixed mpsub bug requested by Gabucino
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4099 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | subreader.c | 7 |
1 files changed, 5 insertions, 2 deletions
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; |