[MPlayer-dev-eng] [patch] subreader: SSA reading fix

Milan Čermák milan.cermak at e-fractal.cz
Sat Jun 17 14:01:12 CEST 2006


Hi all,
I got a bit tired about SSA parsing and decide to fix or rewrite it. As
I looked into the code found the parsing code kind of fuzzy. So at first
I tried to give it a bit more order.

To the problem: SSA parsing relied on number of commas in subtitle line.
The number varies from version to version so the original author decided
to use kind of heuristics. (I don't blame him/her for that. I understand
the reason.)
Fortunately, the precise number of commas can be obtained from "Format"
line. That's what my patch do.

Furthermore it fixes comma counting (the original can skip a comma if
there is an empty item) and in-line commands removing.

I'm planning to do more on subtitle parsing. As a preparation I made a
subreaderctx (context) structure, that will hold any reader specific
information.

Regards,
Milan "Manta" Cermak
-------------- next part --------------
A non-text attachment was scrubbed...
Name: subreaderctx.h
Type: text/x-chdr
Size: 451 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20060617/a91bc147/attachment.h>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: subreader.c.diff
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20060617/a91bc147/attachment.txt>


More information about the MPlayer-dev-eng mailing list