MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / av_packet_side_data_new

Function av_packet_side_data_new

libavcodec/packet.c:694–714  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

692}
693
694AVPacketSideData *av_packet_side_data_new(AVPacketSideData **psd, int *pnb_sd,
695 enum AVPacketSideDataType type,
696 size_t size, int flags)
697{
698 AVPacketSideData *sd = NULL;
699 uint8_t *data;
700
701 if (size > SIZE_MAX - AV_INPUT_BUFFER_PADDING_SIZE)
702 return NULL;
703
704 data = av_malloc(size + AV_INPUT_BUFFER_PADDING_SIZE);
705 if (!data)
706 return NULL;
707 memset(data + size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
708
709 sd = packet_side_data_add(psd, pnb_sd, type, data, size);
710 if (!sd)
711 av_freep(&data);
712
713 return sd;
714}
715
716void av_packet_side_data_remove(AVPacketSideData *sd, int *pnb_sd,
717 enum AVPacketSideDataType type)

Callers 15

add_display_matrixFunction · 0.85
mkv_parse_videoFunction · 0.85
mov_read_dac3Function · 0.85
mov_read_dec3Function · 0.85
mov_read_clapFunction · 0.85
mov_read_colrFunction · 0.85
mov_parse_exif_itemFunction · 0.85
ff_replaygain_export_rawFunction · 0.85
parse_mca_labelsFunction · 0.85

Calls 3

packet_side_data_addFunction · 0.85
av_freepFunction · 0.85
av_mallocFunction · 0.50

Tested by

no test coverage detected