--- webp-pixbuf-loader-0.2.4/io-webp.c.bak 2023-08-10 15:00:15.674290562 +0300 +++ webp-pixbuf-loader-0.2.4/io-webp.c 2023-08-10 15:02:05.835648645 +0300 @@ -143,6 +143,8 @@ stop_load (gpointer data, GError **error { if (context->prepare_func) context->prepare_func (pb, GDK_PIXBUF_ANIMATION (anim), context->user_data); + if (context->update_func) + context->update_func (pb, 0, 0, context->width, context->height, context->user_data); ret = TRUE; } @@ -174,6 +176,9 @@ stop_load (gpointer data, GError **error return FALSE; } + if (context->prepare_func) + context->prepare_func (pb, NULL, context->user_data); + if (icc_data) { gdk_pixbuf_set_option (pb, "icc-profile", icc_data); @@ -187,17 +192,14 @@ stop_load (gpointer data, GError **error context->buffer->len, &config); if (status == VP8_STATUS_OK) { - if (context->prepare_func) - context->prepare_func (pb, NULL, context->user_data); - - g_clear_object (&pb); - ret = TRUE; } else { g_set_error (error, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_FAILED, "WebP decoder failed with VP8 status code: %d", status); } + + g_clear_object (&pb); } if (context->buffer)