diff options
Diffstat (limited to 'thumbnailer')
-rw-r--r-- | thumbnailer/gdk-pixbuf-thumbnailer.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/thumbnailer/gdk-pixbuf-thumbnailer.c b/thumbnailer/gdk-pixbuf-thumbnailer.c index d50ede8ee..8308ecaf7 100644 --- a/thumbnailer/gdk-pixbuf-thumbnailer.c +++ b/thumbnailer/gdk-pixbuf-thumbnailer.c @@ -36,6 +36,14 @@ file_to_pixbuf (const char *path, if (pixbuf == NULL) return NULL; + /* The GIF codec throws GDK_PIXBUF_ERROR_INCOMPLETE_ANIMATION + * if it's closed without decoding all the frames. Since + * gdk_pixbuf_new_from_file_at_size only decodes the first + * frame, this specific error needs to be ignored. + */ + if (error != NULL && g_error_matches (*error, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_INCOMPLETE_ANIMATION)) + g_clear_error (error); + tmp_pixbuf = gdk_pixbuf_apply_embedded_orientation (pixbuf); gdk_pixbuf_copy_options (pixbuf, tmp_pixbuf); gdk_pixbuf_remove_option (tmp_pixbuf, "orientation"); |