[][src]Function stainless_ffmpeg_sys::avcodec_fill_audio_frame

pub unsafe extern "C" fn avcodec_fill_audio_frame(
    frame: *mut AVFrame,
    nb_channels: c_int,
    sample_fmt: AVSampleFormat,
    buf: *const u8,
    buf_size: c_int,
    align: c_int
) -> c_int

Fill AVFrame audio data and linesize pointers.

The buffer buf must be a preallocated buffer with a size big enough to contain the specified samples amount. The filled AVFrame data pointers will point to this buffer.

AVFrame extended_data channel pointers are allocated if necessary for planar audio.

@param frame the AVFrame frame->nb_samples must be set prior to calling the function. This function fills in frame->data, frame->extended_data, frame->linesize[0]. @param nb_channels channel count @param sample_fmt sample format @param buf buffer to use for frame data @param buf_size size of buffer @param align plane size sample alignment (0 = default) @return >=0 on success, negative error code on failure @todo return the size in bytes required to store the samples in case of success, at the next libavutil bump