[MPlayer-dev-eng] Re: [PATCH] S_TEXT/SSA support for Matroska files.

Tristan z80 at oceanfree.net
Wed Sep 10 04:09:51 CEST 2003


> On a sidenote, I found a bug in my MVK/SSA decoder. Subs with the same
> timestamp will conflict with each other, but SSA subs can have
> conflicting timestamps as subs can be instructed to be displayed at
> different places (see http://ld-anime.faireal.net/guide/mkv-eng). I'm
> trying to work out a sensible solution as I write this.

And I have found a potential solution. MPlayer doesn't seem to have a 
position indicator in the subtitle struct so I took any subtitle with a 
overlapping timestamp and added it to the next text line. Its certainly 
less than ideal but that way subs don't wack each other around.

It works by defaulting to add text to the next text line and recording a 
timestamp for each line (handle_subtitles function). At the clear_subs 
place, it runs through the list of timestamps and removes each line from 
the display accordingly.

I've also included a 10l bug fix (there could be a comma in the subtitle 
text which would lead to cutting the SSA line in the wrong place).

The patch is against current CVS which currently doesn't have my old 
patch in place yet.

- Tristan Willy
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: matroska.h.patch
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20030909/c28a642a/attachment.asc>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: demux_mkv.cpp.patch
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20030909/c28a642a/attachment.txt>


More information about the MPlayer-dev-eng mailing list