better stop on sinkdisc fail

we were not always setting stop on allocate fail, could deadlock if (for
example) flush failed
This commit is contained in:
John Cupitt 2016-05-31 21:58:01 +01:00
parent d51911cda8
commit 45b6345e7f

View File

@ -334,8 +334,10 @@ wbuffer_allocate_fn( VipsThreadState *state, void *a, gboolean *stop )
/* Block until the write of the previous buffer
* is done, then set write of this buffer going.
*/
if( wbuffer_flush( write ) )
if( wbuffer_flush( write ) ) {
*stop = TRUE;
return( -1 );
}
/* End of image?
*/
@ -359,8 +361,10 @@ wbuffer_allocate_fn( VipsThreadState *state, void *a, gboolean *stop )
/* Position buf at the new y.
*/
if( wbuffer_position( write->buf,
sink_base->y, sink_base->nlines ) )
sink_base->y, sink_base->nlines ) ) {
*stop = TRUE;
return( -1 );
}
}
}