[FFmpeg-devel] [PATCH] AVPacket.display_duration

Wolfram Gloger wmglo
Tue Sep 9 15:43:05 CEST 2008


> From: Uoti Urpala <uoti.urpala at pp1.inet.fi>
> Date: Tue, 09 Sep 2008 13:29:55 +0300
> 
> Aurelien's use of convergence_duration
> was mistaken and didn't match the meaning of the field.

convergence_duration is currently _only_ used in matroska
(and there, AFAICS, only for subtitles exactly like the
proposed "display_duration" field).  So, why is this mistaken,
or what could be the possible use of "convergence_duration"
for a subtitle packet _other_ than the proposed "display_duration"?

> Matroska packets
> have one kind of explicit duration value, which would be specified in
> display_duration.

As indicated in http://roundup.mplayerhq.hu/roundup/ffmpeg/issue588,
some elaborate subtitle formats might even generate several subtitles
from a single packet, with separate start and end times.  I'm sure we
agree that we could not keep adding more and more pts2... and
display_duration2... fields to AVPacket, so Michael's suggestion to
keep such intricacies in AVPacket.data certainly has some merit.

Why not just keep the following (status quo) fields:

AVPacket.pts marks the start of displaying the (first) subtitle,
i.e. the first time the packet has some perceptible effect

AVPacket.convergence_time marks the end (relative to pts) of
the (last) subtitle in this packet, i.e. the last time the packet
has some perceptible effect

That would be consistent with video, and, for the common case of one
subtitle per packet, would make display_duration superfluous, no?

Regards,
Wolfram.




More information about the ffmpeg-devel mailing list