[MPlayer-dev-eng] Subreader patch to support AQTitle format
Arpi
arpi at thot.banki.hu
Sun Oct 21 17:08:38 CEST 2001
Hi,
> Hi,
> here is a patch to subtitler.c, which adds support for AQTitle format of
> subtitles.
> AQTitle is czech format for subtitles nowday not so much used used, but
> common by older movies.
>
> Should I upload some subtitles also?
yes
and re-send this patch in unified diff (diff -u) form.
and base64 encoded (maybe gzipped), as current one is very unusable:
(and RTFM DOCS/tech/patches.txt)
> 40d39 < // 9 for AQTitle 53d51 <
> 411,451d408 < subtitle *previous_aqt_sub = NULL; < < subtitle *sub_read_line_aqt(FILE *fd,subtitle *current) {
> < char line[1001];
> <
> < bzero (current, sizeof(subtitle));
> < < while (1) { < // try to locate next subtitle < if (!fgets (line, 1000, fd))
> < return NULL;
> < if (!(sscanf (line, "-->> %ld", &(current->start)) <1))
> < break;
> < } < < if (previous_aqt_sub != NULL) < previous_aqt_sub->end = current->start-1;
> < < previous_aqt_sub = current; < < if (!fgets (line, 1000, fd))
> < return NULL;
> < < sub_readtext(&line,¤t->text[0]);
> < current->lines = 1;
> < current->end = current->start; // will be corrected by next subtitle < < if (!fgets (line, 1000, fd))
> < return current;; < < sub_readtext(&line,¤t->text[1]);
> < current->lines = 2;
> <
> < if ((current->text[0]=="") && (current->text[1]=="")) { < // void subtitle -> end of previous marked and exit
> < previous_aqt_sub = NULL; < return NULL; < } < < return current;
> < }
> 490,491d446 < if (strstr (line, "-->>"))
> < {sub_uses_time=0; return 9;}
> 578,580c533 < sub_read_line_mpsub , < sub_read_line_aqt < --- > sub_read_line_mpsub
> 662,664c615 < ".SSA", < ".aqt", < ".AQT"};
> --- > ".SSA"};
>
A'rpi / Astral & ESP-team
--
mailto:arpi at thot.banki.hu
http://esp-team.scene.hu
More information about the MPlayer-dev-eng
mailing list