The following fields must be set on frame before calling this function:
- format (pixel format for video, sample format for audio)
- width and height for video
- nb_samples and channel_layout for audio
This function will fill AVFrame.data and AVFrame.buf arrays and, if
necessary, allocate and fill AVFrame.extended_data and AVFrame.extended_buf.
For planar formats, one buffer will be allocated for each plane.
@param frame frame in which to store the new buffers.
@param align required buffer size alignment
@return 0 on success, a negative AVERROR on error.
Allocate new buffer(s) for audio or video data.
The following fields must be set on frame before calling this function: - format (pixel format for video, sample format for audio) - width and height for video - nb_samples and channel_layout for audio
This function will fill AVFrame.data and AVFrame.buf arrays and, if necessary, allocate and fill AVFrame.extended_data and AVFrame.extended_buf. For planar formats, one buffer will be allocated for each plane.
@param frame frame in which to store the new buffers. @param align required buffer size alignment
@return 0 on success, a negative AVERROR on error.