Browse Source

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

Pal Lockheart 6 years ago
parent
commit
0b6bf3b2b8
1 changed files with 1 additions and 0 deletions
  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
 			//
 			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;
 		case AVI_JUNK:
 		default: