瀏覽代碼

Once image type has been set, do not autoprobe further

tags/v0.9.3
Michael Brown 18 年之前
父節點
當前提交
c1fd6e8dc7
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5
    0
      src/core/image.c

+ 5
- 0
src/core/image.c 查看文件

@@ -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 );

Loading…
取消
儲存