@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_frame_unref(frame) before doing anything else.
@return 0 on success, otherwise negative error code:
AVERROR(EAGAIN): output is not available in the current state - user
must try to send input
the encoder has been fully flushed, and there will be
no more output packets
AVERROR(EINVAL): codec not opened, or it is an encoder
other errors: legitimate decoding errors
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_frame_unref(frame) before doing anything else. @return 0 on success, otherwise negative error code: AVERROR(EAGAIN): output is not available in the current state - user must try to send input