cbs: Ensure that reference fields always follow the associated pointer

Having these together allows us to find both pointers given the address
of only one of them.
This commit is contained in:
Mark Thompson 2020-07-27 17:32:17 +01:00
parent 0271098e6c
commit 1fe77d4a63
6 changed files with 28 additions and 28 deletions

View File

@ -284,8 +284,8 @@ typedef struct AV1RawFrameHeader {
typedef struct AV1RawTileData {
uint8_t *data;
size_t data_size;
AVBufferRef *data_ref;
size_t data_size;
} AV1RawTileData;
typedef struct AV1RawTileGroup {
@ -346,8 +346,8 @@ typedef struct AV1RawMetadataITUTT35 {
uint8_t itu_t_t35_country_code_extension_byte;
uint8_t *payload;
size_t payload_size;
AVBufferRef *payload_ref;
size_t payload_size;
} AV1RawMetadataITUTT35;
typedef struct AV1RawMetadataTimecode {
@ -379,8 +379,8 @@ typedef struct AV1RawMetadata {
typedef struct AV1RawPadding {
uint8_t *payload;
size_t payload_size;
AVBufferRef *payload_ref;
size_t payload_size;
} AV1RawPadding;

View File

@ -277,16 +277,16 @@ typedef struct H264RawSEIPanScanRect {
typedef struct H264RawSEIUserDataRegistered {
uint8_t itu_t_t35_country_code;
uint8_t itu_t_t35_country_code_extension_byte;
uint8_t *data;
size_t data_length;
uint8_t *data;
AVBufferRef *data_ref;
size_t data_length;
} H264RawSEIUserDataRegistered;
typedef struct H264RawSEIUserDataUnregistered {
uint8_t uuid_iso_iec_11578[16];
uint8_t *data;
size_t data_length;
uint8_t *data;
AVBufferRef *data_ref;
size_t data_length;
} H264RawSEIUserDataUnregistered;
typedef struct H264RawSEIRecoveryPoint {
@ -334,9 +334,9 @@ typedef struct H264RawSEIPayload {
H264RawSEIAlternativeTransferCharacteristics
alternative_transfer_characteristics;
struct {
uint8_t *data;
size_t data_length;
uint8_t *data;
AVBufferRef *data_ref;
size_t data_length;
} other;
} payload;
} H264RawSEIPayload;
@ -429,10 +429,10 @@ typedef struct H264RawSliceHeader {
typedef struct H264RawSlice {
H264RawSliceHeader header;
uint8_t *data;
size_t data_size;
int data_bit_start;
uint8_t *data;
AVBufferRef *data_ref;
size_t data_size;
int data_bit_start;
} H264RawSlice;
typedef struct H264RawFiller {

View File

@ -183,9 +183,9 @@ typedef struct H265RawVUI {
} H265RawVUI;
typedef struct H265RawExtensionData {
uint8_t *data;
size_t bit_length;
uint8_t *data;
AVBufferRef *data_ref;
size_t bit_length;
} H265RawExtensionData;
typedef struct H265RawVPS {
@ -541,10 +541,10 @@ typedef struct H265RawSliceHeader {
typedef struct H265RawSlice {
H265RawSliceHeader header;
uint8_t *data;
size_t data_size;
int data_bit_start;
uint8_t *data;
AVBufferRef *data_ref;
size_t data_size;
int data_bit_start;
} H265RawSlice;
@ -600,15 +600,15 @@ typedef struct H265RawSEIUserDataRegistered {
uint8_t itu_t_t35_country_code;
uint8_t itu_t_t35_country_code_extension_byte;
uint8_t *data;
size_t data_length;
AVBufferRef *data_ref;
size_t data_length;
} H265RawSEIUserDataRegistered;
typedef struct H265RawSEIUserDataUnregistered {
uint8_t uuid_iso_iec_11578[16];
uint8_t *data;
size_t data_length;
AVBufferRef *data_ref;
size_t data_length;
} H265RawSEIUserDataUnregistered;
typedef struct H265RawSEIRecoveryPoint {
@ -710,9 +710,9 @@ typedef struct H265RawSEIPayload {
alternative_transfer_characteristics;
H265RawSEIAlphaChannelInfo alpha_channel_info;
struct {
uint8_t *data;
size_t data_length;
uint8_t *data;
AVBufferRef *data_ref;
size_t data_length;
} other;
} payload;
H265RawExtensionData extension_data;

View File

@ -80,8 +80,8 @@ typedef struct JPEGRawScanHeader {
typedef struct JPEGRawScan {
JPEGRawScanHeader header;
uint8_t *data;
size_t data_size;
AVBufferRef *data_ref;
size_t data_size;
} JPEGRawScan;
typedef struct JPEGRawQuantisationTable {

View File

@ -76,9 +76,9 @@ typedef struct MPEG2RawSequenceHeader {
typedef struct MPEG2RawUserData {
uint8_t user_data_start_code;
uint8_t *user_data;
size_t user_data_length;
uint8_t *user_data;
AVBufferRef *user_data_ref;
size_t user_data_length;
} MPEG2RawUserData;
typedef struct MPEG2RawSequenceExtension {
@ -206,10 +206,10 @@ typedef struct MPEG2RawSliceHeader {
typedef struct MPEG2RawSlice {
MPEG2RawSliceHeader header;
uint8_t *data;
size_t data_size;
int data_bit_start;
uint8_t *data;
AVBufferRef *data_ref;
size_t data_size;
int data_bit_start;
} MPEG2RawSlice;
typedef struct MPEG2RawSequenceEnd {

View File

@ -165,8 +165,8 @@ typedef struct VP9RawFrame {
VP9RawFrameHeader header;
uint8_t *data;
size_t data_size;
AVBufferRef *data_ref;
size_t data_size;
} VP9RawFrame;
typedef struct VP9RawSuperframeIndex {