[MPlayer-dev-eng] [PATCH] Tags support for SubRip and MicroDVD subtitles
Kazuo Teramoto
kaz.rag at gmail.com
Mon May 17 15:34:50 CEST 2010
2010/5/16 ubitux <ubitux at gmail.com>:
> Hi,
>
> Well, I've spend my week end on supporting tags for SubRip and MicroDVD
> subtitles, and it seems to work fine.
>
Good work ubitux!
I'm testing the SubRip part of the code.
I think we need the support of named colors (from html 4.01 std). And
a wrong attribute that is really common (from my subtitles sources at
least), a color or size attribute withouts " (like color=#FFFFFF or
color=white).
And a behavior aspect, when its find an invalid attribute in font tag
the parser stops, but I think that is best to continue parsing,
because when can find a valid attr after that. For example
<font color="#00ffccerror" size="30">
Dont get a color, but do get a size.
I made a patch (to by applied after you patch) to solve that matters, in resume:
- Named color (some code from Johatan patch)
- Attributes w/o " (size and color only)
- Continue parsing after a wrong attribute
I used goto... sorry =[, I know goto is bad. But I tried to minimize
the modification of your patch and mplayer.c use goto too (not really
a excuse...). The patch is versus the git repo.
Regards,
Kazuo
--
«Dans la vie, rien n'est à craindre, tout est à comprendre»
Marie Sklodowska Curie.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: subrip_named_quotes.diff
Type: text/x-patch
Size: 5125 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20100517/1adc8175/attachment.bin>
More information about the MPlayer-dev-eng
mailing list