fix webp from pipe
This commit is contained in:
parent
3d344b4b5f
commit
d992f09dfa
@ -724,9 +724,10 @@ vips_streami_pipe_read_to_position( VipsStreami *streami, gint64 target )
|
|||||||
g_assert( streami->header_bytes );
|
g_assert( streami->header_bytes );
|
||||||
g_assert( streami->is_pipe );
|
g_assert( streami->is_pipe );
|
||||||
|
|
||||||
if( target < 0 ||
|
if( target != -1 &&
|
||||||
|
(target < 0 ||
|
||||||
(streami->length != -1 &&
|
(streami->length != -1 &&
|
||||||
target > streami->length) ) {
|
target > streami->length)) ) {
|
||||||
vips_error( vips_stream_nick( VIPS_STREAM( streami ) ),
|
vips_error( vips_stream_nick( VIPS_STREAM( streami ) ),
|
||||||
_( "bad read to %" G_GINT64_FORMAT ), target );
|
_( "bad read to %" G_GINT64_FORMAT ), target );
|
||||||
return( -1 );
|
return( -1 );
|
||||||
@ -838,7 +839,7 @@ vips_streami_map( VipsStreami *streami, size_t *length_out )
|
|||||||
/* Seekable descriptor sources can be mmaped and become memory
|
/* Seekable descriptor sources can be mmaped and become memory
|
||||||
* sources.
|
* sources.
|
||||||
*/
|
*/
|
||||||
if( !streami->is_pipe &&
|
if( !streami->data &&
|
||||||
!streami->mmap_baseaddr &&
|
!streami->mmap_baseaddr &&
|
||||||
streami->length > 0 &&
|
streami->length > 0 &&
|
||||||
stream->descriptor != -1 &&
|
stream->descriptor != -1 &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user