MCPcopy Create free account
hub / github.com/AOMediaCodec/libavif / avifCodecEncodeOutputCreate

Function avifCodecEncodeOutputCreate

src/write.c:124–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122// avifCodecEncodeOutput
123
124avifCodecEncodeOutput * avifCodecEncodeOutputCreate(void)
125{
126 avifCodecEncodeOutput * encodeOutput = (avifCodecEncodeOutput *)avifAlloc(sizeof(avifCodecEncodeOutput));
127 if (encodeOutput == NULL) {
128 return NULL;
129 }
130 memset(encodeOutput, 0, sizeof(avifCodecEncodeOutput));
131 if (!avifArrayCreate(&encodeOutput->samples, sizeof(avifEncodeSample), 1)) {
132 avifCodecEncodeOutputDestroy(encodeOutput);
133 return NULL;
134 }
135 return encodeOutput;
136}
137
138avifResult avifCodecEncodeOutputAddSample(avifCodecEncodeOutput * encodeOutput, const uint8_t * data, size_t len, avifBool sync)
139{

Callers 1

Calls 3

avifAllocFunction · 0.85
avifArrayCreateFunction · 0.85

Tested by

no test coverage detected