| 1037 | } |
| 1038 | |
| 1039 | static avifTile * avifDecoderDataCreateTile(avifDecoderData * data, avifCodecType codecType, uint32_t width, uint32_t height, uint8_t operatingPoint) |
| 1040 | { |
| 1041 | avifTile * tile = (avifTile *)avifArrayPush(&data->tiles); |
| 1042 | if (tile == NULL) { |
| 1043 | return NULL; |
| 1044 | } |
| 1045 | tile->codecType = codecType; |
| 1046 | tile->image = avifImageCreateEmpty(); |
| 1047 | if (!tile->image) { |
| 1048 | goto error; |
| 1049 | } |
| 1050 | tile->input = avifCodecDecodeInputCreate(); |
| 1051 | if (!tile->input) { |
| 1052 | goto error; |
| 1053 | } |
| 1054 | tile->width = width; |
| 1055 | tile->height = height; |
| 1056 | tile->operatingPoint = operatingPoint; |
| 1057 | return tile; |
| 1058 | |
| 1059 | error: |
| 1060 | if (tile->input) { |
| 1061 | avifCodecDecodeInputDestroy(tile->input); |
| 1062 | } |
| 1063 | if (tile->image) { |
| 1064 | avifImageDestroy(tile->image); |
| 1065 | } |
| 1066 | avifArrayPop(&data->tiles); |
| 1067 | return NULL; |
| 1068 | } |
| 1069 | |
| 1070 | static avifTrack * avifDecoderDataCreateTrack(avifDecoderData * data) |
| 1071 | { |
no test coverage detected