diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-10-31 17:27:24 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-11-02 07:58:38 +0100 |
commit | 0876c28080750e0978ba77c3f72cdd2b0d069a6f (patch) | |
tree | e406369ea8fb5d82485ce1191af45cba16836a58 /libavcodec | |
parent | fdc867288697d8b052145e80911d2d338d7d02b7 (diff) | |
download | ffmpeg-0876c28080750e0978ba77c3f72cdd2b0d069a6f.tar.gz |
lavc: add some AVPacket doxy.
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/avcodec.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index d6a4e4d429..73321b2040 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -872,6 +872,28 @@ enum AVPacketSideDataType { AV_PKT_DATA_H263_MB_INFO, }; +/** + * This structure stores compressed data. It is typically exported by demuxers + * and then passed as input to decoders, or received as output from encoders and + * then passed to muxers. + * + * For video, it should typically contain one compressed frame. For audio it may + * contain several compressed frames. + * + * AVPacket is one of the few structs in Libav, whose size is a part of public + * ABI. Thus it may be allocated on stack and no new fields can be added to it + * without libavcodec and libavformat major bump. + * + * The semantics of data ownership depends on the destruct field. + * If it is set, the packet data is dynamically allocated and is valid + * indefinitely until av_free_packet() is called (which in turn calls the + * destruct callback to free the data). If destruct is not set, 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 + * av_free_packet(). + */ typedef struct AVPacket { /** * Presentation timestamp in AVStream->time_base units; the time at which |