From 71b557cfc1d83f1df1f511ecf38a870daf35a1b7 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Mon, 7 Oct 2019 15:42:29 +0100 Subject: [PATCH] remove "minimise" handler from tiffload We need to be able to disconnect the underlying fd and we can't do that without making our own input handler for files. Implement this when we add input objects. --- libvips/foreign/tiff2vips.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/libvips/foreign/tiff2vips.c b/libvips/foreign/tiff2vips.c index e9586d2a..245f9807 100644 --- a/libvips/foreign/tiff2vips.c +++ b/libvips/foreign/tiff2vips.c @@ -189,8 +189,6 @@ * 7/6/19 * - istiff reads the first directory rather than just testing the magic * number, so it ignores more TIFF-like, but not TIFF images - * 20/7/19 - * - use "minimise" for early shutdown, rather than read Y position */ /* @@ -496,20 +494,6 @@ rtiff_close_cb( VipsObject *object, Rtiff *rtiff ) rtiff_free( rtiff ); } -static void -rtiff_minimise_cb( VipsObject *object, Rtiff *rtiff ) -{ -#ifdef DEBUG - printf( "rtiff_minimise_cb: %p minimise\n", rtiff ); -#endif /*DEBUG*/ - - /* Close early for non-tiled TIFFs. Tiled TIFFs are read randomly, so - * the end of a loop doesn't mean the tiff won't be used again. - */ - if( !rtiff->header.tiled ) - rtiff_free( rtiff ); -} - static Rtiff * rtiff_new( VipsImage *out, int page, int n, gboolean autorotate ) { @@ -536,8 +520,10 @@ rtiff_new( VipsImage *out, int page, int n, gboolean autorotate ) g_signal_connect( out, "close", G_CALLBACK( rtiff_close_cb ), rtiff ); - g_signal_connect( out, "minimise", - G_CALLBACK( rtiff_minimise_cb ), rtiff ); + /* Don't link to minimise. We need to be able to disconnect the + * underlying fd and we can't do that without making our own input + * handler for files. Implement this when we add input objects. + */ if( rtiff->page < 0 || rtiff->page > 1000000 ) { vips_error( "tiff2vips", _( "bad page number %d" ),