[vlc-devel] Matroska, libopus and loophole in the spec

Timothy B. Terriberry tterribe at xiph.org
Tue Nov 5 03:46:39 CET 2013


Denis Charmet wrote:
> Is there a way to bypass the framesize limitation? Should I wait for the
> next frame of the same track to get the duration knowing that this will
> fail for the last frame? Should I create a VLC_CODEC_OPUS_AVCODEC that
> will force the use of lavc to decode without the restrictions?

You can just look at the start of the packet to figure out what its 
duration is. See opus_packet_get_nb_frames() and 
opus_packet_get_samples_per_frame(). The duration of the packet is the 
product of these two, but make sure to check the return from 
opus_packet_get_nb_frames() for errors.



More information about the vlc-devel mailing list