jxlsave: correctly mark frame as last (#2988)

It's required to close the input, otherwise the encoder can't
know what the last frame is, resulting in an improper codestream.

Resolves: #2987.
This commit is contained in:
Kleis Auke Wolthuizen 2022-08-14 16:53:33 +02:00 committed by GitHub
parent 1989203985
commit 34427d83a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -438,6 +438,11 @@ vips_foreign_save_jxl_build( VipsObject *object )
return( -1 );
}
/* This function must be called after the final frame and/or box,
* otherwise the codestream will not be encoded correctly.
*/
JxlEncoderCloseInput( jxl->encoder );
do {
uint8_t *out;
size_t avail_out;