cbs: Fragment/unit data is always reference counted

Make this clear in the documentation and add some asserts to ensure
that it is always true.
This commit is contained in:
Mark Thompson
2018-05-01 00:18:16 +01:00
parent d176497cec
commit d7786b66bd
2 changed files with 18 additions and 11 deletions

View File

@@ -84,8 +84,9 @@ typedef struct CodedBitstreamUnit {
*/
size_t data_bit_padding;
/**
* If data is reference counted, a reference to the buffer containing
* data. Null if data is not reference counted.
* A reference to the buffer containing data.
*
* Must be set if data is not NULL.
*/
AVBufferRef *data_ref;
@@ -130,8 +131,9 @@ typedef struct CodedBitstreamFragment {
*/
size_t data_bit_padding;
/**
* If data is reference counted, a reference to the buffer containing
* data. Null if data is not reference counted.
* A reference to the buffer containing data.
*
* Must be set if data is not NULL.
*/
AVBufferRef *data_ref;