[vlc-devel] Matroska, libopus and loophole in the spec
typx at dinauz.org
Sun Nov 10 12:59:26 CET 2013
Le jeudi 07 novembre 2013 à 10:05:34, Timothy B. Terriberry a écrit :
> >>Better would be to have the demux always provide this duration,
> >>wouldn't it? You need information from the MKV layer to handle
> >>pre-skip and end-trimming correctly, anyway.
> The spec for the demuxer API? I'm confused. What do you think needs
> to be made mandatory where?
Since you say "Better would be to have the demux always provide this
duration", then you have two choices:
1. Change the Opus in matroska muxing spec to make duration of blocks
mandatory so we can calculate the number of samples, which is overkill.
2. Wait for the next audio packet to determine the previous one's
duration which is even worse, since you cannot do that for the last
packet and if you have a lace of several audio packet you could
theoretically wait for a long time between two actual packets which
could cause audio gaps.
The alternative is to change the Opus codec plugin to use the number of
samples of the packet if it isn't known at the demux level instead of
just dropping it. As proposed in the patch sent yesterday.
As previously stated, I'm against linking the demux to a codec lib just
to fill a block_t field that could easily be ignored and to call
functions that will be called in the codec anyway for the same purpose.
Denis Charmet - TypX
Le mauvais esprit est un art de vivre
More information about the vlc-devel