Removes unnecessary data copies, and partially fixes potential issues
with dangling references held in said lists.
Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
* commit 'eccc03c8fbc603a0a3257df66f0705f74fe2581a':
cbs_h264: Add support for filler NAL units
Some bitstream -> get_bits.
Merged-by: Mark Thompson <sw@jkqxz.net>
* commit 'a2ca8ed903b435446031a8a0792ca535e6ee2913':
cbs_h264: Add utility functions to insert/delete SEI messages
Merged-by: Mark Thompson <sw@jkqxz.net>
* commit 'ce5870a3a8f2b10668ee4f04c2ae0287f66f31b2':
cbs: Refcount all the things!
Some changes for bitstream API.
Merged-by: Mark Thompson <sw@jkqxz.net>
This makes it easier for users of the CBS API to get alloc/free right -
all subelements use the buffer API so that it's clear how to free them.
It also allows eliding some redundant copies: the packet -> fragment copy
disappears after this change if the input packet is refcounted, and more
codec-specific cases are now possible (but not included in this patch).