[MPlayer-dev-eng] [PATCH] packet pts as ASS start time

Uoti Urpala uoti.urpala at pp1.inet.fi
Sun Sep 14 22:34:38 CEST 2008


On Sun, 2008-09-14 at 22:00 +0200, Aurelien Jacobs wrote:
> What it read is end_pts-start_pts (IOW: display_duration).
> My patch override start_pts after duration was calculated.

So you now understand that using absolute timestamps in muxed data was a
bad idea, and you should store duration instead? But instead of
admitting that your format was misdesigned and storing duration you're
altering the interpretation of the existing fields in an attempt to keep
something that _looks_ like your old design. Changing the interpretation
of the start and stop fields to not mean start and stop serves no
sensible purpose. Storing duration directly is superior in every way.

> And I provided no way to override duration, because the demuxers don't
> have to know the duration (which is generally not stored in containers).

Most codecs only require a single timestamp per packet as each packet
only has one timed event. And so most containers have been designed for
such codecs. However SSA/ASS with the current packet format is NOT such
a codec: it has two timed events per packet. So it's common not to need
duration, but SSA/ASS is one exception.

> That was the whole purpose of this controverted change: move the
> duration information to the packet data level (as for any other codec)
> instead of keeping it at the container level (which is useless for
> almost any kind of codec, and thus not possible in almost any container).

You do need to store the duration information in some other way in
containers that only support a single time value per packet, but your
attempt at implementing it failed. You do not need changes like this
patch to implement it right.





More information about the MPlayer-dev-eng mailing list