浏览代码

Big-Endian fix: avi chunk processing, which caused 2.avi not playing on wii

Pal Lockheart 6 年之前
父节点
当前提交
0b6bf3b2b8
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      aviplay.c

+ 1 - 0
aviplay.c

@@ -453,6 +453,7 @@ PAL_ReadDataChunk(
 			// Only 'rec ' LIST is allowed here, if not, skip it completely
 			// Only 'rec ' LIST is allowed here, if not, skip it completely
 			//
 			//
 			if (fread(&hdr.list.type, sizeof(uint32_t), 1, fp) != 1) return NULL;
 			if (fread(&hdr.list.type, sizeof(uint32_t), 1, fp) != 1) return NULL;
+			hdr.list.type = SDL_SwapLE32(hdr.list.type);
 			if (hdr.list.type == AVI_rec) break;
 			if (hdr.list.type == AVI_rec) break;
 		case AVI_JUNK:
 		case AVI_JUNK:
 		default:
 		default: