| 3859 | } |
| 3860 | |
| 3861 | avifResult avifEncoderWrite(avifEncoder * encoder, const avifImage * image, avifRWData * output) |
| 3862 | { |
| 3863 | avifResult addImageResult = avifEncoderAddImage(encoder, image, 1, AVIF_ADD_IMAGE_FLAG_SINGLE); |
| 3864 | if (addImageResult != AVIF_RESULT_OK) { |
| 3865 | return addImageResult; |
| 3866 | } |
| 3867 | return avifEncoderFinish(encoder, output); |
| 3868 | } |
| 3869 | |
| 3870 | // Implementation of section 2.3.3 of AV1 Codec ISO Media File Format Binding specification v1.2.0. |
| 3871 | // See https://aomediacodec.github.io/av1-isobmff/v1.2.0.html#av1codecconfigurationbox-syntax. |