avcodec/cbs: Make ff_cbs_insert_unit_data() always append the new unit

All split functions (the only users of this function) only
append units.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2022-02-04 13:58:36 +01:00
parent f183ae787a
commit 66d7a21132
7 changed files with 23 additions and 16 deletions

View File

@@ -393,14 +393,13 @@ int ff_cbs_insert_unit_content(CodedBitstreamFragment *frag,
AVBufferRef *content_buf);
/**
* Insert a new unit into a fragment with the given data bitstream.
* Add a new unit to a fragment with the given data bitstream.
*
* If data_buf is not supplied then data must have been allocated with
* av_malloc() and will on success become owned by the unit after this
* call or freed on error.
*/
int ff_cbs_insert_unit_data(CodedBitstreamFragment *frag,
int position,
int ff_cbs_append_unit_data(CodedBitstreamFragment *frag,
CodedBitstreamUnitType type,
uint8_t *data, size_t data_size,
AVBufferRef *data_buf);