Browse Source

Once image type has been set, do not autoprobe further

tags/v0.9.3
Michael Brown 18 years ago
parent
commit
c1fd6e8dc7
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      src/core/image.c

+ 5
- 0
src/core/image.c View File

155
 	struct image_type *type;
155
 	struct image_type *type;
156
 	int rc;
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
 	for ( type = image_types ; type < image_types_end ; type++ ) {
163
 	for ( type = image_types ; type < image_types_end ; type++ ) {
159
 		DBGC ( image, "IMAGE %p trying type %s\n", image, type->name );
164
 		DBGC ( image, "IMAGE %p trying type %s\n", image, type->name );
160
 		rc = image_load_type ( image, type );
165
 		rc = image_load_type ( image, type );

Loading…
Cancel
Save