|
|
@ -1367,15 +1367,19 @@ typedef struct AVPacketSideData { |
|
|
|
* ABI. Thus it may be allocated on stack and no new fields can be added to it |
|
|
|
* ABI. Thus it may be allocated on stack and no new fields can be added to it |
|
|
|
* without libavcodec and libavformat major bump. |
|
|
|
* without libavcodec and libavformat major bump. |
|
|
|
* |
|
|
|
* |
|
|
|
* The semantics of data ownership depends on the buf or destruct (deprecated) |
|
|
|
* The semantics of data ownership depends on the buf field. |
|
|
|
* fields. If either is set, the packet data is dynamically allocated and is |
|
|
|
* If it is set, the packet data is dynamically allocated and is |
|
|
|
* valid indefinitely until av_free_packet() is called (which in turn calls |
|
|
|
* valid indefinitely until a call to av_packet_unref() reduces the |
|
|
|
* av_buffer_unref()/the destruct callback to free the data). If neither is set, |
|
|
|
* reference count to 0. |
|
|
|
* the packet data is typically backed by some static buffer somewhere and is |
|
|
|
|
|
|
|
* only valid for a limited time (e.g. until the next read call when demuxing). |
|
|
|
|
|
|
|
* |
|
|
|
* |
|
|
|
* The side data is always allocated with av_malloc() and is freed in |
|
|
|
* If the buf field is not set av_packet_ref() would make a copy instead |
|
|
|
* av_free_packet(). |
|
|
|
* of increasing the reference count. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* The side data is always allocated with av_malloc(), copied by |
|
|
|
|
|
|
|
* av_packet_ref() and freed by av_packet_unref(). |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @see av_packet_ref |
|
|
|
|
|
|
|
* @see av_packet_unref |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
typedef struct AVPacket { |
|
|
|
typedef struct AVPacket { |
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -3899,7 +3903,7 @@ int av_packet_from_data(AVPacket *pkt, uint8_t *data, int size); |
|
|
|
* packet is allocated if it was not really allocated. |
|
|
|
* packet is allocated if it was not really allocated. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
int av_dup_packet(AVPacket *pkt); |
|
|
|
int av_dup_packet(AVPacket *pkt); |
|
|
|
|
|
|
|
#if FF_API_AVPACKET_OLD_API |
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Copy packet, including contents |
|
|
|
* Copy packet, including contents |
|
|
|
* |
|
|
|
* |
|
|
@ -3917,10 +3921,13 @@ int av_copy_packet_side_data(AVPacket *dst, const AVPacket *src); |
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Free a packet. |
|
|
|
* Free a packet. |
|
|
|
* |
|
|
|
* |
|
|
|
|
|
|
|
* @deprecated Use av_packet_unref |
|
|
|
|
|
|
|
* |
|
|
|
* @param pkt packet to free |
|
|
|
* @param pkt packet to free |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
attribute_deprecated |
|
|
|
void av_free_packet(AVPacket *pkt); |
|
|
|
void av_free_packet(AVPacket *pkt); |
|
|
|
|
|
|
|
#endif |
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Allocate new information of a packet. |
|
|
|
* Allocate new information of a packet. |
|
|
|
* |
|
|
|
* |
|
|
@ -4563,8 +4570,7 @@ AVCodec *avcodec_find_encoder_by_name(const char *name); |
|
|
|
* of the output packet. |
|
|
|
* of the output packet. |
|
|
|
* |
|
|
|
* |
|
|
|
* If this function fails or produces no output, avpkt will be |
|
|
|
* If this function fails or produces no output, avpkt will be |
|
|
|
* freed using av_free_packet() (i.e. avpkt->destruct will be |
|
|
|
* freed using av_packet_unref(). |
|
|
|
* called to free the user supplied buffer). |
|
|
|
|
|
|
|
* @param[in] frame AVFrame containing the raw audio data to be encoded. |
|
|
|
* @param[in] frame AVFrame containing the raw audio data to be encoded. |
|
|
|
* May be NULL when flushing an encoder that has the |
|
|
|
* May be NULL when flushing an encoder that has the |
|
|
|
* AV_CODEC_CAP_DELAY capability set. |
|
|
|
* AV_CODEC_CAP_DELAY capability set. |
|
|
@ -4605,8 +4611,7 @@ int avcodec_encode_audio2(AVCodecContext *avctx, AVPacket *avpkt, |
|
|
|
* caller, he is responsible for freeing it. |
|
|
|
* caller, he is responsible for freeing it. |
|
|
|
* |
|
|
|
* |
|
|
|
* If this function fails or produces no output, avpkt will be |
|
|
|
* If this function fails or produces no output, avpkt will be |
|
|
|
* freed using av_free_packet() (i.e. avpkt->destruct will be |
|
|
|
* freed using av_packet_unref(). |
|
|
|
* called to free the user supplied buffer). |
|
|
|
|
|
|
|
* @param[in] frame AVFrame containing the raw video data to be encoded. |
|
|
|
* @param[in] frame AVFrame containing the raw video data to be encoded. |
|
|
|
* May be NULL when flushing an encoder that has the |
|
|
|
* May be NULL when flushing an encoder that has the |
|
|
|
* AV_CODEC_CAP_DELAY capability set. |
|
|
|
* AV_CODEC_CAP_DELAY capability set. |
|
|
|