Procházet zdrojové kódy

Once image type has been set, do not autoprobe further

tags/v0.9.3
Michael Brown před 18 roky
rodič
revize
c1fd6e8dc7
1 změnil soubory, kde provedl 5 přidání a 0 odebrání
  1. 5
    0
      src/core/image.c

+ 5
- 0
src/core/image.c Zobrazit soubor

@@ -155,6 +155,11 @@ int image_autoload ( struct image *image ) {
155 155
 	struct image_type *type;
156 156
 	int rc;
157 157
 
158
+	/* If image already has a type, use it */
159
+	if ( image->type )
160
+		return image_load ( image );
161
+
162
+	/* Otherwise probe for a suitable type */
158 163
 	for ( type = image_types ; type < image_types_end ; type++ ) {
159 164
 		DBGC ( image, "IMAGE %p trying type %s\n", image, type->name );
160 165
 		rc = image_load_type ( image, type );

Načítá se…
Zrušit
Uložit