smoother aniamted webp write
set the timestamp for the fake final frame equal to the last actual frame ... removes the anim hitch we are still mysteriously dropping a frame though see https://github.com/libvips/libvips/issues/1261
This commit is contained in:
parent
bae484ba2c
commit
6a3b197f31
@ -348,9 +348,10 @@ write_webp_anim( VipsWebPWrite *write, VipsImage *image, int page_height )
|
||||
timestamp_ms += delay;
|
||||
}
|
||||
|
||||
/* Add a last fake frame to signal the last duration.
|
||||
/* Add a last zero length fake frame to signal the last duration.
|
||||
*/
|
||||
if( !WebPAnimEncoderAdd( write->enc, NULL, timestamp_ms, NULL ) ) {
|
||||
if( !WebPAnimEncoderAdd( write->enc,
|
||||
NULL, timestamp_ms - delay, NULL ) ) {
|
||||
vips_error( "vips2webp",
|
||||
"%s", _( "anim build error" ) );
|
||||
return( -1 );
|
||||
|
Loading…
Reference in New Issue
Block a user