av_packet_from_data

Initialize a reference-counted packet from av_malloc()ed data.

@param pkt packet to be initialized. This function will set the data, size, buf and destruct 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 + FF_INPUT_BUFFER_PADDING_SIZE.

@return 0 on success, a negative AVERROR on error

@nogc nothrow extern (C)
int
av_packet_from_data
(,
uint8_t* data
,
int size
)

Meta