Index: src/eog-image.c
===================================================================
--- src/eog-image.c	(Revision 4119)
+++ src/eog-image.c	(Arbeitskopie)
@@ -414,6 +414,21 @@
 	}
 }
 
+static gboolean
+check_loader_threadsafety (GdkPixbufLoader *loader)
+{
+	GdkPixbufFormat *format;
+
+	format = gdk_pixbuf_loader_get_format (loader);
+	if (format) 
+		/* FIXME: We should not be accessing this struct internals
+ 		 * directly. Keep track of bug #469209 to fix that. */
+		return format->flags & GDK_PIXBUF_FORMAT_THREADSAFE;
+	else
+		return FALSE;
+	
+}
+
 static void
 eog_image_pre_size_prepared (GdkPixbufLoader *loader,
 			     gint width,
@@ -421,22 +436,13 @@
 			     gpointer data)
 {
 	EogImage *img;
-	GdkPixbufFormat *format;
 
 	eog_debug (DEBUG_IMAGE_LOAD);
 
 	g_return_if_fail (EOG_IS_IMAGE (data));
 
 	img = EOG_IMAGE (data);
-
-	format = gdk_pixbuf_loader_get_format (loader);
-
-	if (format) {
-		/* FIXME: We should not be accessing this struct internals
- 		 * directly. Keep track of bug #469209 to fix that. */
-		img->priv->threadsafe_format =
-			(format->flags & GDK_PIXBUF_FORMAT_THREADSAFE);
-	}
+	img->priv->threadsafe_format = check_loader_threadsafety (loader);
 }
 
 static void
@@ -989,15 +995,20 @@
 			*error = NULL;
 
 			loader = gdk_pixbuf_loader_new (); 
+		} else {
+			/* The mimetype-based loader should know the
+			 * format here already. */
+			priv->threadsafe_format = check_loader_threadsafety (loader);
 		}
 
 		/* This is used to detect non-threadsafe loaders and disable
  		 * any possible asyncronous task that could bring deadlocks
  		 * to image loading process. */
-		g_signal_connect (loader, 
-				  "size-prepared", 
-				  G_CALLBACK (eog_image_pre_size_prepared),
-				  img);
+		if (!priv->threadsafe_format)
+			g_signal_connect (loader, 
+					  "size-prepared",
+					  G_CALLBACK (eog_image_pre_size_prepared),
+					  img);
 
 		g_signal_connect_object (G_OBJECT (loader), 
 					 "size-prepared", 
