forgot to advance the buffer pointers
thanks kleis see https://github.com/kleisauke/net-vips/issues/101#issuecomment-726046152
This commit is contained in:
parent
2dd6fc1f36
commit
a09027b2a5
|
@ -964,13 +964,14 @@ vips_foreign_load_heif_read( void *data, size_t size, void *userdata )
|
|||
VipsForeignLoadHeif *heif = (VipsForeignLoadHeif *) userdata;
|
||||
|
||||
while( size > 0 ) {
|
||||
gint64 result;
|
||||
gint64 bytes_read;
|
||||
|
||||
result = vips_source_read( heif->source, data, size );
|
||||
if( result <= 0 )
|
||||
bytes_read = vips_source_read( heif->source, data, size );
|
||||
if( bytes_read <= 0 )
|
||||
return( -1 );
|
||||
|
||||
size -= result;
|
||||
size -= bytes_read;
|
||||
data += bytes_read;
|
||||
}
|
||||
|
||||
return( 0 );
|
||||
|
|
|
@ -473,6 +473,7 @@ vips_foreign_load_ppm_generate_binary( VipsRegion *or,
|
|||
}
|
||||
|
||||
n_bytes -= bytes_read;
|
||||
q += bytes_read;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue