Function avcodec_receive_packet

pub unsafe extern "C" fn avcodec_receive_packet(
    avctx: *mut AVCodecContext,
    avpkt: *mut AVPacket,
) -> i32
Expand description

Read encoded data from the encoder.

@param avctx codec context @param avpkt This will be set to a reference-counted packet allocated by the encoder. Note that the function will always call av_packet_unref(avpkt) before doing anything else. @retval 0 success @retval AVERROR(EAGAIN) output is not available in the current state - user must try to send input @retval AVERROR_EOF the encoder has been fully flushed, and there will be no more output packets @retval AVERROR(EINVAL) codec not opened, or it is a decoder @retval “another negative error code” legitimate encoding errors