fix webp new from buffer

This commit is contained in:
John Cupitt 2019-11-06 20:37:23 +00:00
parent d992f09dfa
commit ca5816a62c

View File

@ -244,13 +244,8 @@ vips_streami_build( VipsObject *object )
* We need to call the method directly rather than via
* vips_streami_seek() etc. or we might trigger seek emulation.
*/
if( class->seek( streami, 0, SEEK_CUR ) == -1 ) {
/* Not seekable. This must be some kind of pipe.
*/
VIPS_DEBUG_MSG( " not seekable\n" );
streami->is_pipe = TRUE;
}
else {
if( streami->data ||
class->seek( streami, 0, SEEK_CUR ) != -1 ) {
/* We should be able to get the length of seekable objects.
*/
if( (streami->length = vips_streami_size( streami )) == -1 )
@ -260,6 +255,12 @@ vips_streami_build( VipsObject *object )
*/
VIPS_FREEF( g_byte_array_unref, streami->header_bytes );
}
else {
/* Not seekable. This must be some kind of pipe.
*/
VIPS_DEBUG_MSG( " not seekable\n" );
streami->is_pipe = TRUE;
}
return( 0 );
}