[MPlayer-dev-eng] [PATCH] libass: fix parsing of tracks extracted from containers

Aurelien Jacobs aurel at gnuage.org
Fri Sep 5 17:05:59 CEST 2008


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.

> > Aurel
> >
> > PS: yes, it will break libass playback with old, deprecated mkv
> > demuxer. The only correct place to fix this is in the mkv demuxer
> > itself. I don't think it's worth fixing it, but if people insist
> > about it, I would have a look.
> 
> I think it's not good to keep broken code, so demux_mkv should be either fixed 
> or dropped. Since there are regressions, the latter is not an option.

It is fixed.

Aurel



More information about the MPlayer-dev-eng mailing list