fix jxload restart
if the loader was restarted (eg by vipsdisp) it could fail to fetch pixels
This commit is contained in:
parent
6a53ab47e1
commit
33cca3ecbc
@ -2,6 +2,8 @@
|
||||
*
|
||||
* 18/3/20
|
||||
* - from heifload.c
|
||||
* 1/10/21
|
||||
* - reset read point for _load
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -627,6 +629,17 @@ vips_foreign_load_jxl_load( VipsForeignLoad *load )
|
||||
if( vips_foreign_load_jxl_set_header( jxl, t[0] ) )
|
||||
return( -1 );
|
||||
|
||||
/* We have to reset the reader ... we can't reply onb the read point
|
||||
* being left just after the header.
|
||||
*/
|
||||
if( vips_source_rewind( jxl->source ) )
|
||||
return( -1 );
|
||||
|
||||
if( vips_foreign_load_jxl_fill_input( jxl, 0 ) )
|
||||
return( -1 );
|
||||
JxlDecoderSetInput( jxl->decoder,
|
||||
jxl->input_buffer, jxl->bytes_in_buffer );
|
||||
|
||||
/* Read to the end of the image.
|
||||
*/
|
||||
do {
|
||||
|
Loading…
Reference in New Issue
Block a user