MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / CBS_FUNC(alloc_unit_content)

Function CBS_FUNC(alloc_unit_content)

libavcodec/cbs.c:945–962  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

943}
944
945int CBS_FUNC(alloc_unit_content)(CodedBitstreamContext *ctx,
946 CodedBitstreamUnit *unit)
947{
948 CodedBitstreamUnitTypeDescriptor *desc;
949
950 av_assert0(!unit->content && !unit->content_ref);
951
952 desc = cbs_find_unit_type_desc(ctx, unit);
953 if (!desc)
954 return AVERROR(ENOSYS);
955
956 unit->content_ref = cbs_alloc_content(desc);
957 if (!unit->content_ref)
958 return AVERROR(ENOMEM);
959 unit->content = unit->content_ref;
960
961 return 0;
962}
963
964static int cbs_clone_noncomplex_unit_content(void **clonep,
965 const CodedBitstreamUnit *unit,

Callers

nothing calls this directly

Calls 2

cbs_find_unit_type_descFunction · 0.85
cbs_alloc_contentFunction · 0.85

Tested by

no test coverage detected