aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/cbs.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-08-04 11:31:18 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-08-08 11:29:33 +0200
commit2ba04bafb427ea93e3614c0469a6e13e55ac9dc9 (patch)
tree5b1fea598507b7783023e56f04897f9ac8112f72 /libavcodec/cbs.c
parent2d722b6638a1b925d7e9e01e45611c450bfcf7ee (diff)
downloadffmpeg-2ba04bafb427ea93e3614c0469a6e13e55ac9dc9.tar.gz
avcodec/cbs: Remove ff_cbs_alloc_unit_content
It is no longer used. Also rename ff_cbs_alloc_unit_content2 to ff_cbs_alloc_unit_content. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/cbs.c')
-rw-r--r--libavcodec/cbs.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/libavcodec/cbs.c b/libavcodec/cbs.c
index 57b57238ed..07ae658a4c 100644
--- a/libavcodec/cbs.c
+++ b/libavcodec/cbs.c
@@ -695,26 +695,6 @@ int ff_cbs_write_signed(CodedBitstreamContext *ctx, PutBitContext *pbc,
}
-int ff_cbs_alloc_unit_content(CodedBitstreamUnit *unit,
- size_t size,
- void (*free)(void *opaque, uint8_t *data))
-{
- av_assert0(!unit->content && !unit->content_ref);
-
- unit->content = av_mallocz(size);
- if (!unit->content)
- return AVERROR(ENOMEM);
-
- unit->content_ref = av_buffer_create(unit->content, size,
- free, NULL, 0);
- if (!unit->content_ref) {
- av_freep(&unit->content);
- return AVERROR(ENOMEM);
- }
-
- return 0;
-}
-
static int cbs_insert_unit(CodedBitstreamFragment *frag,
int position)
{
@@ -893,8 +873,8 @@ static const CodedBitstreamUnitTypeDescriptor
return NULL;
}
-int ff_cbs_alloc_unit_content2(CodedBitstreamContext *ctx,
- CodedBitstreamUnit *unit)
+int ff_cbs_alloc_unit_content(CodedBitstreamContext *ctx,
+ CodedBitstreamUnit *unit)
{
const CodedBitstreamUnitTypeDescriptor *desc;