| 487 | } |
| 488 | |
| 489 | static const avifInputFile * avifInputGetFile(const avifInput * input, int imageIndex) |
| 490 | { |
| 491 | if (imageIndex < input->cacheCount) { |
| 492 | return &input->files[input->cache[imageIndex].fileIndex]; |
| 493 | } |
| 494 | if (input->fileIndex >= input->filesCount) { |
| 495 | return NULL; |
| 496 | } |
| 497 | |
| 498 | if (input->files[input->fileIndex].filename == AVIF_FILENAME_STDIN) { |
| 499 | assert(input->fileIndex == 0); |
| 500 | ungetc(fgetc(stdin), stdin); // Kick stdin to force EOF |
| 501 | |
| 502 | if (feof(stdin)) { |
| 503 | return NULL; |
| 504 | } |
| 505 | } |
| 506 | |
| 507 | return &input->files[input->fileIndex]; |
| 508 | } |
| 509 | |
| 510 | static avifBool avifInputHasRemainingData(const avifInput * input, int imageIndex) |
| 511 | { |
no outgoing calls
no test coverage detected