mirror of
https://github.com/mpv-player/mpv
synced 2024-12-26 17:12:36 +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:
parent
d9ff2768db
commit
7bc932abc8
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user