Skip to content

Commit 34427d8

Browse files
authored
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.
1 parent 1989203 commit 34427d8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libvips/foreign/jxlsave.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,11 @@ vips_foreign_save_jxl_build( VipsObject *object )
438438
return( -1 );
439439
}
440440

441+
/* This function must be called after the final frame and/or box,
442+
* otherwise the codestream will not be encoded correctly.
443+
*/
444+
JxlEncoderCloseInput( jxl->encoder );
445+
441446
do {
442447
uint8_t *out;
443448
size_t avail_out;

0 commit comments

Comments
 (0)