Function av_packet_from_data
pub unsafe extern "C" fn av_packet_from_data(
pkt: *mut AVPacket,
data: *mut u8,
size: i32,
) -> i32
Expand description
Initialize a reference-counted packet from av_malloc()ed data.
@param pkt packet to be initialized. This function will set the data, size, and buf fields, all others are left untouched. @param data Data allocated by av_malloc() to be used as packet data. If this function returns successfully, the data is owned by the underlying AVBuffer. The caller may not access the data through other means. @param size size of data in bytes, without the padding. I.e. the full buffer size is assumed to be size + AV_INPUT_BUFFER_PADDING_SIZE.
@return 0 on success, a negative AVERROR on error