fix webp new from buffer
This commit is contained in:
parent
d992f09dfa
commit
ca5816a62c
@ -244,13 +244,8 @@ vips_streami_build( VipsObject *object )
|
|||||||
* We need to call the method directly rather than via
|
* We need to call the method directly rather than via
|
||||||
* vips_streami_seek() etc. or we might trigger seek emulation.
|
* vips_streami_seek() etc. or we might trigger seek emulation.
|
||||||
*/
|
*/
|
||||||
if( class->seek( streami, 0, SEEK_CUR ) == -1 ) {
|
if( streami->data ||
|
||||||
/* Not seekable. This must be some kind of pipe.
|
class->seek( streami, 0, SEEK_CUR ) != -1 ) {
|
||||||
*/
|
|
||||||
VIPS_DEBUG_MSG( " not seekable\n" );
|
|
||||||
streami->is_pipe = TRUE;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
/* We should be able to get the length of seekable objects.
|
/* We should be able to get the length of seekable objects.
|
||||||
*/
|
*/
|
||||||
if( (streami->length = vips_streami_size( streami )) == -1 )
|
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 );
|
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 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user