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

Uoti Urpala uoti.urpala at pp1.inet.fi
Sat Sep 6 01:40:47 CEST 2008


On Sat, 2008-09-06 at 00:55 +0200, Aurelien Jacobs wrote:
> The ReadOrder field is not part of any ASS spec. It's only part of
> Matroska internal format, probably won't be present when muxed in
> any other kind of container.
> Moreover, the only purpose of this ReadOrder field is to be able
> to reconstruct the exact original ASS file out of the Matroska file,
> by re-ordering the ASS events line in their original order.
> Now the matroska demuxer correctly output a spec compliant ASS
> event line, which means the ReadOrder don't get out of the
> matroska container.

But it SHOULD get out of the container. That is information stored in
the file, and the application using the demuxer should be able to access
it. If it can't that is a deficiency in the demuxer.

> Anyway, this is quite easy to solve. Currently, libass stores all
> the events line it receives, forever. When the events are received
> out of demuxed packets, there's no reason to keep them in memory
> forever.

There is, they can be needed after seeking. Keeping them in memory
ensures that you see all subtitles if you seek within an already-played
file part.

>  The demuxer will send them again as soon as they are needed.

No it won't if the packet occurred before the seeked-to position.

> So the simple attached patch will just free every events as soon
> as they are not displayed anymore (if they come from a demuxed packet).
> Is this OK ?

No.





More information about the MPlayer-dev-eng mailing list