1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-26 00:42:57 +00:00

fixed mpsub bug requested by Gabucino

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4099 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
laaz 2002-01-12 00:02:52 +00:00
parent d9ff2768db
commit 7bc932abc8

View File

@ -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;