summaryrefslogtreecommitdiff
path: root/libavcodec/cbs.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-10-19 16:35:47 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-10-22 17:28:01 +0200
commit543ef831a8363712dca9c90222ecfc002b42a0c3 (patch)
treebdaf9ef0473fd5baaa8d4e502f93d4797b5adfdb /libavcodec/cbs.c
parentff3c7086867b78d6bd6c96ddef02886aba381633 (diff)
avcodec/cbs: Remove CBS_CONTENT_TYPE_POD
It is equivalent to CBS_CONTENT_TYPE_INTERNAL_REFS with nb_offsets equal to zero. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/cbs.c')
-rw-r--r--libavcodec/cbs.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/libavcodec/cbs.c b/libavcodec/cbs.c
index 8d6e3c3442..504197e06d 100644
--- a/libavcodec/cbs.c
+++ b/libavcodec/cbs.c
@@ -839,12 +839,10 @@ void ff_cbs_delete_unit(CodedBitstreamFragment *frag,
static void cbs_default_free_unit_content(void *opaque, uint8_t *data)
{
const CodedBitstreamUnitTypeDescriptor *desc = opaque;
- if (desc->content_type == CBS_CONTENT_TYPE_INTERNAL_REFS) {
- int i;
- for (i = 0; i < desc->type.ref.nb_offsets; i++) {
- void **ptr = (void**)(data + desc->type.ref.offsets[i]);
- av_buffer_unref((AVBufferRef**)(ptr + 1));
- }
+
+ for (int i = 0; i < desc->type.ref.nb_offsets; i++) {
+ void **ptr = (void**)(data + desc->type.ref.offsets[i]);
+ av_buffer_unref((AVBufferRef**)(ptr + 1));
}
av_free(data);
}
@@ -981,14 +979,6 @@ static int cbs_clone_unit_content(CodedBitstreamContext *ctx,
return AVERROR(ENOSYS);
switch (desc->content_type) {
- case CBS_CONTENT_TYPE_POD:
- ref = av_buffer_alloc(desc->content_size);
- if (!ref)
- return AVERROR(ENOMEM);
- memcpy(ref->data, unit->content, desc->content_size);
- err = 0;
- break;
-
case CBS_CONTENT_TYPE_INTERNAL_REFS:
err = cbs_clone_internal_refs_unit_content(&ref, unit, desc);
break;