@param avctx codec context
@param avpkt output AVPacket (may contain a user-provided buffer)
@paramin frame AVFrame containing the raw data to be encoded
@paramout got_packet_ptr encoder sets to 0 or 1 to indicate that a
non-empty packet was returned in avpkt.
@return 0 on success, negative error code on failure
Encode data to an AVPacket.
@param avctx codec context @param avpkt output AVPacket (may contain a user-provided buffer) @paramin frame AVFrame containing the raw data to be encoded @paramout got_packet_ptr encoder sets to 0 or 1 to indicate that a non-empty packet was returned in avpkt. @return 0 on success, negative error code on failure