Function avcodec_receive_frame

pub unsafe extern "C" fn avcodec_receive_frame(
    avctx: *mut AVCodecContext,
    frame: *mut AVFrame,
) -> i32
Expand description

Return decoded output data from a decoder or encoder (when the @ref AV_CODEC_FLAG_RECON_FRAME flag is used).

@param avctx codec context @param frame This will be set to a reference-counted video or audio frame (depending on the decoder type) allocated by the codec. Note that the function will always call av_frame_unref(frame) before doing anything else.

@retval 0 success, a frame was returned @retval AVERROR(EAGAIN) output is not available in this state - user must try to send new input @retval AVERROR_EOF the codec has been fully flushed, and there will be no more output frames @retval AVERROR(EINVAL) codec not opened, or it is an encoder without the @ref AV_CODEC_FLAG_RECON_FRAME flag enabled @retval “other negative error code” legitimate decoding errors