Function av_append_packet

Source
pub unsafe extern "C" fn av_append_packet(
    s: *mut AVIOContext,
    pkt: *mut AVPacket,
    size: c_int,
) -> c_int
Expand description

Read data and append it to the current content of the AVPacket. If pkt->size is 0 this is identical to av_get_packet. Note that this uses av_grow_packet and thus involves a realloc which is inefficient. Thus this function should only be used when there is no reasonable way to know (an upper bound of) the final size.

@param s associated IO context @param pkt packet @param size amount of data to read @return >0 (read size) if OK, AVERROR_xxx otherwise, previous data will not be lost even if an error occurs.