Function opus_packet_pad

Source
pub unsafe extern "C" fn opus_packet_pad(
    data: *mut c_uchar,
    len: opus_int32,
    new_len: opus_int32,
) -> c_int
Expand description

Pads a given Opus packet to a larger size (possibly changing the TOC sequence).

§Arguments

  • data [in,out] - const unsigned char*: The buffer containing the packet to pad.
  • len - opus_int32: The size of the packet. This must be at least 1.
  • new_len - opus_int32: The desired size of the packet after padding. This must be at least as large as len.

§Returns

an error code

  • #OPUS_OK on success.
  • #OPUS_BAD_ARG len was less than 1 or new_len was less than len.
  • #OPUS_INVALID_PACKET data did not contain a valid Opus packet.