Mercurial > mplayer.hg
comparison subreader.c @ 31695:8f7554cf4441
subtitles: fix build without libass
Conditionally use ass_enabled to unbreak build with libass support
disabled; this problems was introduced with r31752.
Patch by Andrew Wason, rectalogic AT rectalogic DOT com.
author | greg |
---|---|
date | Wed, 21 Jul 2010 17:51:06 +0000 |
parents | b41cbf02f854 |
children | 8d65df40de82 |
comparison
equal
deleted
inserted
replaced
31694:e251996735b5 | 31695:8f7554cf4441 |
---|---|
296 &(current->start), line2) < 2) && | 296 &(current->start), line2) < 2) && |
297 (sscanf (line, | 297 (sscanf (line, |
298 "{%ld}{%ld}%[^\r\n]", | 298 "{%ld}{%ld}%[^\r\n]", |
299 &(current->start), &(current->end), line2) < 3)); | 299 &(current->start), &(current->end), line2) < 3)); |
300 | 300 |
301 #ifdef CONFIG_ASS | |
301 if (ass_enabled) { | 302 if (ass_enabled) { |
302 subassconvert_microdvd(line2, line, LINE_LEN + 1); | 303 subassconvert_microdvd(line2, line, LINE_LEN + 1); |
303 p = line; | 304 p = line; |
304 } else | 305 } else |
306 #endif | |
305 p = line2; | 307 p = line2; |
306 | 308 |
307 next=p, i=0; | 309 next=p, i=0; |
308 while ((next =sub_readtext (next, &(current->text[i])))) { | 310 while ((next =sub_readtext (next, &(current->text[i])))) { |
309 if (current->text[i]==ERR) {return ERR;} | 311 if (current->text[i]==ERR) {return ERR;} |
431 char line[LINE_LEN+1]; | 433 char line[LINE_LEN+1]; |
432 int a1,a2,a3,a4,b1,b2,b3,b4; | 434 int a1,a2,a3,a4,b1,b2,b3,b4; |
433 char *p=NULL; | 435 char *p=NULL; |
434 int i,len; | 436 int i,len; |
435 | 437 |
438 #ifdef CONFIG_ASS | |
436 if (ass_enabled) | 439 if (ass_enabled) |
437 return sub_ass_read_line_subviewer(st, current, utf16); | 440 return sub_ass_read_line_subviewer(st, current, utf16); |
441 #endif | |
438 while (!current->text[0]) { | 442 while (!current->text[0]) { |
439 if (!stream_read_line (st, line, LINE_LEN, utf16)) return NULL; | 443 if (!stream_read_line (st, line, LINE_LEN, utf16)) return NULL; |
440 if ((len=sscanf (line, "%d:%d:%d%[,.:]%d --> %d:%d:%d%[,.:]%d",&a1,&a2,&a3,(char *)&i,&a4,&b1,&b2,&b3,(char *)&i,&b4)) < 10) | 444 if ((len=sscanf (line, "%d:%d:%d%[,.:]%d --> %d:%d:%d%[,.:]%d",&a1,&a2,&a3,(char *)&i,&a4,&b1,&b2,&b3,(char *)&i,&b4)) < 10) |
441 continue; | 445 continue; |
442 current->start = a1*360000+a2*6000+a3*100+a4/10; | 446 current->start = a1*360000+a2*6000+a3*100+a4/10; |