summaryrefslogtreecommitdiff
path: root/libavcodec/cbs_internal.h
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2020-07-27 17:32:21 +0100
committerMark Thompson <sw@jkqxz.net>2020-09-02 00:00:57 +0100
commit42daac1c74169ec4373b5199932c5f3176a2e897 (patch)
tree648c634f72e60fb0d6fff3da6ea9a1ac577de23b /libavcodec/cbs_internal.h
parent2cb152d52f28081acf3c2306557944105af8374f (diff)
cbs: Add support functions for handling unit content references
Use the unit type table to determine what we need to do to clone the internals of the unit content when making copies for refcounting or writeability. (This will still fail for units with complex content if they do not have a defined clone function.) Setup and naming from a patch by Andreas Rheinhardt <andreas.rheinhardt@gmail.com>, but with the implementation changed to use the unit type information if possible rather than requiring a codec-specific function.
Diffstat (limited to 'libavcodec/cbs_internal.h')
-rw-r--r--libavcodec/cbs_internal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/cbs_internal.h b/libavcodec/cbs_internal.h
index 35159f9c5f..d991e1eedf 100644
--- a/libavcodec/cbs_internal.h
+++ b/libavcodec/cbs_internal.h
@@ -80,6 +80,7 @@ typedef const struct CodedBitstreamUnitTypeDescriptor {
size_t ref_offsets[CBS_MAX_REF_OFFSETS];
void (*content_free)(void *opaque, uint8_t *data);
+ int (*content_clone)(AVBufferRef **ref, CodedBitstreamUnit *unit);
} CodedBitstreamUnitTypeDescriptor;
typedef struct CodedBitstreamType {