26 void **
data,
size_t *sei_size)
39 *sei_size = side_data->
size + 11;
58 sei_data[8] = ((side_data->
size/3) & 0x1f) | 0x40;
61 memcpy(sei_data + 10, side_data->
data, side_data->
size);
63 sei_data[side_data->
size+10] = 255;
71 size_t new_size, old_size = buf ? buf->
size : 0;
80 if (!(
data[1] & 0x40))
83 cc_count =
data[1] & 0x1F;
89 if (cc_count * 3 >=
size - 3)
92 new_size = (old_size + cc_count * 3);
94 if (new_size > INT_MAX)
104 memcpy(buf->
data + old_size,
data + 3, cc_count * 3);
int ff_parse_a53_cc(AVBufferRef **pbuf, const uint8_t *data, int size)
Parse a data array for ATSC A53 Part 4 Closed Captions and store them in an AVBufferRef.
int ff_alloc_a53_sei(const AVFrame *frame, size_t prefix_len, void **data, size_t *sei_size)
Check AVFrame for A53 side data and allocate and fill SEI message with A53 info.
#define MKTAG(a, b, c, d)
int av_buffer_realloc(AVBufferRef **pbuf, buffer_size_t size)
Reallocate a given buffer.
AVFrameSideData * av_frame_get_side_data(const AVFrame *frame, enum AVFrameSideDataType type)
@ AV_FRAME_DATA_A53_CC
ATSC A53 Part 4 Closed Captions.
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
A reference to a data buffer.
int size
Size of data in bytes.
uint8_t * data
The data buffer.
Structure to hold side data for an AVFrame.
This structure describes decoded (raw) audio or video data.