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

Evgeniy Stepanov eugeni.stepanov at gmail.com
Fri Sep 5 16:28:47 CEST 2008


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.

> 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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1.patch
Type: text/x-patch
Size: 2615 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20080905/ac228531/attachment.bin>


More information about the MPlayer-dev-eng mailing list