[MPlayer-dev-eng] [PATCH] libass: fix parsing of tracks extracted from containers
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Fri Sep 5 17:39:53 CEST 2008
On Friday 05 September 2008 19:05:59 Aurelien Jacobs wrote:
> Evgeniy Stepanov wrote:
> > On Friday 05 September 2008 03:49:48 Aurelien Jacobs wrote:
> > > Hi,
> > >
> > > Currently, libass has a ass_process_chunk() function which is used to
> > > process packets containing one subtitle line, extracted from the
> > > subtitle track of a container. This function was designed to parse
> > > non-compliant, butchered ASS line comming out of the old, deprecated
> > > matroska demuxer. This is the only demuxer producing such broken
> > > ASS packet.
> > > The attached patch adds a new ass_process_data() which will process
> > > valid ASS data, and uses it instead of ass_process_chunk(). This will
> > > fix playback of ASS tracks comming from lavf.
> > > After this patch is applied I guess ass_process_chunk() could be
> > > removed.
> > > Test sample: http://samples.mplayerhq.hu/Matroska/haruhi.mkv
> > >
> > > Is this OK with you, Evgeniy ?
> >
> > It's fine. A small change: i've copied a debug line from
> > ass_process_chunk to the new function.
>
> OK. Applied.
Sorry, I did not think (and test) enough. Try playing over some subtitle
several times, it will multiply. To prevent this, subtitles in mkv have a field
named ReadOrder. It's value is lost somewhere in lavf mkv demuxer.
More information about the MPlayer-dev-eng
mailing list