소스 검색

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…
취소
저장