subreader: fix some of ASS parser issues
commit91f516f7c74d16eb108013be61e84d476de9914b
authorUoti Urpala <uau@mplayer2.org>
Wed, 21 Nov 2012 23:22:25 +0000 (22 01:22 +0200)
committerUoti Urpala <uau@mplayer2.org>
Wed, 28 Nov 2012 00:17:05 +0000 (28 02:17 +0200)
tree5fa433a63fdebd932ce8fedcb714e7359b86131d
parentea731165aa25f8d6b5a707ec5b80c770b28705e0
subreader: fix some of ASS parser issues

The subreader.c ASS parser (used when playing an external ASS subtitle
file with --no-ass for "plaintext" display) hardcodes dialogue line
syntax instead of correctly reading it from the "Format: " line in the
file, but tried to support a varying amount of fields by guessing
where the text field (which should be last) begins. This guessing code
was buggy in many ways. Remove it and hardcode skipping 9 commas
before the text field, which should work for most files. I don't
consider the --no-ass case important enough to implement correct
parsing now. Also fix the code removing formatting tags, which failed
to remove the second in a pair of two consecutive tags.
sub/subreader.c