[MPlayer-dev-eng] A bit more liberal parsing of <font> tags in .srt files?
Szokovacs Robert
szo at szo.hu
Thu Feb 16 11:13:01 CET 2012
Hi,
A lot of .srt subtitle files I encounter on the net is deemed incorrect by
the current mplayer, so the <font> tag is displayed as if it was part of the
script.
(example: http://www.tvsubtitles.net/download-204587.html, some color=
misses the quotes around the value.)
My itch is scratched by the attached patch, but it doesn't care about the
case when the quotes are missing and there are more than one subtags are
present (<font color=red size=2> won't be parsed), so if there is interest,
I'm hereby volunteering to refactor subassconvert_subrip() so it will accept
whitespaces wherever possible. As far as I could tell, there is no official
specification for .srt format, so I think it's good policy to accept
anything we can parse unambiguously. Also, since the conversion takes place
when loading the subtitle not while playback is ongoing, some speed
sacrifice is acceptable.
br
Szo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mplayersub.patch
Type: text/x-patch
Size: 2780 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20120216/73a48196/attachment.bin>
More information about the MPlayer-dev-eng
mailing list