diff options
author | Lynne <dev@lynne.ee> | 2021-01-23 19:56:18 +0100 |
---|---|---|
committer | Lynne <dev@lynne.ee> | 2021-08-02 14:30:52 +0200 |
commit | a1a0fddfd05c1dd0c03e5aa4d51baedad59fa117 (patch) | |
tree | b7afb886c06165f2a0de852ee4a9ecee3942f278 /libavcodec/packet.h | |
parent | a27853a7300bb3c2752256b2fc02f2439619f6f8 (diff) | |
download | ffmpeg-a1a0fddfd05c1dd0c03e5aa4d51baedad59fa117.tar.gz |
avpacket: ABI bump additions
This commit adds a long-requested by API users opaque fields for
AVPacket, as well as a time_base field.
Diffstat (limited to 'libavcodec/packet.h')
-rw-r--r-- | libavcodec/packet.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/libavcodec/packet.h b/libavcodec/packet.h index a9d3a9b596..9baff24635 100644 --- a/libavcodec/packet.h +++ b/libavcodec/packet.h @@ -391,6 +391,27 @@ typedef struct AVPacket { int64_t duration; int64_t pos; ///< byte position in stream, -1 if unknown + + /** + * for some private data of the user + */ + void *opaque; + + /** + * AVBufferRef for free use by the API user. FFmpeg will never check the + * contents of the buffer ref. FFmpeg calls av_buffer_unref() on it when + * the packet is unreferenced. av_packet_copy_props() calls create a new + * reference with av_buffer_ref() for the target packet's opaque_ref field. + * + * This is unrelated to the opaque field, although it serves a similar + * purpose. + */ + AVBufferRef *opaque_ref; + + /** + * Time base of the packet's timestamps. + */ + AVRational time_base; } AVPacket; #if FF_API_INIT_PACKET |