• Vincent Penquerc'h's avatar
    opus: fix FEC · 1ef601e7
    Vincent Penquerc'h authored
    FEC may only be used when PLC is enabled on the audio decoder,
    as it relies on empty buffers to generate audio from the next
    buffer. Hooking to the gap events doesn't work as the audio
    decoder does not like more buffers output than it sends.
    The length of data to generate using FEC from the next packet
    is determined by rounding the gap duration to nearest. This
    ensures that duration imprecision does not cause quantization
    to 2.5 milliseconds less than available. Doing so causes the
    Opus API to fail decoding. Such duration imprecision is common
    in live cases.
    The buffer to consider when determining the length of audio
    to be decoded is the previous buffer when using FEC, and the
    new buffer otherwise. In the FEC case, this means we determine
    the amount of audio from the previous buffer, whether it was
    missing or not (and get the data either from this buffer, or
    the current one if the previous one was missing).
Last commit
Last update
Makefile.am Loading commit data...
gstopus.c Loading commit data...
gstopuscommon.c Loading commit data...
gstopuscommon.h Loading commit data...
gstopusdec.c Loading commit data...
gstopusdec.h Loading commit data...
gstopusenc.c Loading commit data...
gstopusenc.h Loading commit data...
gstopusheader.c Loading commit data...
gstopusheader.h Loading commit data...