| 519 | } |
| 520 | |
| 521 | static DWORD EnsureFileSpanFramesLoaded(TCascFile * hf) |
| 522 | { |
| 523 | DWORD dwErrCode; |
| 524 | |
| 525 | if(hf->ContentSize == CASC_INVALID_SIZE64 || hf->pFileSpan->pFrames == NULL) |
| 526 | { |
| 527 | // Load all frames of all file spans |
| 528 | dwErrCode = LoadFileSpanFrames(hf); |
| 529 | if(dwErrCode != ERROR_SUCCESS) |
| 530 | return dwErrCode; |
| 531 | |
| 532 | // Now the content size must be known |
| 533 | if(hf->ContentSize == CASC_INVALID_SIZE64) |
| 534 | return ERROR_CAN_NOT_COMPLETE; |
| 535 | } |
| 536 | |
| 537 | return ERROR_SUCCESS; |
| 538 | } |
| 539 | |
| 540 | static DWORD DecodeFileFrame( |
| 541 | TCascFile * hf, |
no test coverage detected