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

Function avifDecoderDataCreate

src/read.c:995–1009  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

993static void avifDecoderDataDestroy(avifDecoderData * data);
994
995static avifDecoderData * avifDecoderDataCreate(void)
996{
997 avifDecoderData * data = (avifDecoderData *)avifAlloc(sizeof(avifDecoderData));
998 if (data == NULL) {
999 return NULL;
1000 }
1001 memset(data, 0, sizeof(avifDecoderData));
1002 data->meta = avifMetaCreate();
1003 if (data->meta == NULL || !avifArrayCreate(&data->tracks, sizeof(avifTrack), 2) ||
1004 !avifArrayCreate(&data->tiles, sizeof(avifTile), 8)) {
1005 avifDecoderDataDestroy(data);
1006 return NULL;
1007 }
1008 return data;
1009}
1010
1011static void avifDecoderDataResetCodec(avifDecoderData * data)
1012{

Callers 1

avifDecoderParseFunction · 0.85

Calls 4

avifAllocFunction · 0.85
avifMetaCreateFunction · 0.85
avifArrayCreateFunction · 0.85
avifDecoderDataDestroyFunction · 0.85

Tested by

no test coverage detected