fix vipsthumbnail on very-many-core systems

see:

https://github.com/jcupitt/libvips/issues/160

we were using UNBUFFERED, but on very-many-core systems this can get out
of order enough to make vipspng free the read object early
This commit is contained in:
John Cupitt 2014-08-21 13:05:29 +01:00
parent 573b94e3ec
commit 694d86e5c5
2 changed files with 5 additions and 2 deletions

View File

@ -3,6 +3,7 @@
- fix similarity rotate+scale, thanks Topochicho
- fix 16-bit PNG save, thanks John
- fix dzsave date on Windows, thanks John
- fix vipsthumbnail on many-core systems, thanks James
25/7/14 started 7.40.5
- fix a race in im_maxpos_avg()

View File

@ -318,8 +318,10 @@ thumbnail_open( VipsObject *process, const char *filename )
"loading jpeg with factor %d pre-shrink",
jpegshrink );
/* We can't use UNBUFERRED safely on very-many-core systems.
*/
if( !(im = vips_image_new_from_file( filename,
"access", VIPS_ACCESS_SEQUENTIAL_UNBUFFERED,
"access", VIPS_ACCESS_SEQUENTIAL,
"shrink", jpegshrink,
NULL )) )
return( NULL );
@ -328,7 +330,7 @@ thumbnail_open( VipsObject *process, const char *filename )
/* All other formats.
*/
if( !(im = vips_image_new_from_file( filename,
"access", VIPS_ACCESS_SEQUENTIAL_UNBUFFERED,
"access", VIPS_ACCESS_SEQUENTIAL,
NULL )) )
return( NULL );
}