Changeset View
Changeset View
Standalone View
Standalone View
source/blender/io/avi/intern/avi.c
| Show First 20 Lines • Show All 585 Lines • ▼ Show 20 Lines | AviError AVI_open_movie(const char *name, AviMovie *movie) | ||||
| movie->movi_offset = BLI_ftell(movie->fp); | movie->movi_offset = BLI_ftell(movie->fp); | ||||
| movie->read_offset = movie->movi_offset; | movie->read_offset = movie->movi_offset; | ||||
| /* Read in the index if the file has one, otherwise create one */ | /* Read in the index if the file has one, otherwise create one */ | ||||
| if (movie->header->Flags & AVIF_HASINDEX) { | if (movie->header->Flags & AVIF_HASINDEX) { | ||||
| BLI_fseek(movie->fp, size - 4, SEEK_CUR); | BLI_fseek(movie->fp, size - 4, SEEK_CUR); | ||||
| if (GET_FCC(movie->fp) != FCC("idx1")) { | if (GET_FCC(movie->fp) != FCC("idx1")) { | ||||
| DEBUG_PRINT("bad index informatio\n"); | DEBUG_PRINT("bad index information\n"); | ||||
| return AVI_ERROR_FORMAT; | return AVI_ERROR_FORMAT; | ||||
| } | } | ||||
| movie->index_entries = GET_FCC(movie->fp) / sizeof(AviIndexEntry); | movie->index_entries = GET_FCC(movie->fp) / sizeof(AviIndexEntry); | ||||
| if (movie->index_entries == 0) { | if (movie->index_entries == 0) { | ||||
| DEBUG_PRINT("no index entries\n"); | DEBUG_PRINT("no index entries\n"); | ||||
| return AVI_ERROR_FORMAT; | return AVI_ERROR_FORMAT; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 452 Lines • Show Last 20 Lines | |||||