| 136 | } |
| 137 | |
| 138 | avifResult avifCodecEncodeOutputAddSample(avifCodecEncodeOutput * encodeOutput, const uint8_t * data, size_t len, avifBool sync) |
| 139 | { |
| 140 | avifEncodeSample * sample = (avifEncodeSample *)avifArrayPush(&encodeOutput->samples); |
| 141 | AVIF_CHECKERR(sample, AVIF_RESULT_OUT_OF_MEMORY); |
| 142 | const avifResult result = avifRWDataSet(&sample->data, data, len); |
| 143 | if (result != AVIF_RESULT_OK) { |
| 144 | avifArrayPop(&encodeOutput->samples); |
| 145 | return result; |
| 146 | } |
| 147 | sample->sync = sync; |
| 148 | return AVIF_RESULT_OK; |
| 149 | } |
| 150 | |
| 151 | void avifCodecEncodeOutputDestroy(avifCodecEncodeOutput * encodeOutput) |
| 152 | { |
no test coverage detected