diff --git a/src/read.c b/src/read.c index 8d39b07..6289fa4 100644 --- a/src/read.c +++ b/src/read.c @@ -940,7 +940,7 @@ static avifResult avifDecoderItemMaxExtent(const avifDecoderItem * item, const a return AVIF_RESULT_BMFF_PARSE_FAILED; } startOffset += remainingOffset; - extentSize -= remainingOffset; + extentSize -= (size_t)remainingOffset; remainingOffset = 0; } } @@ -3085,7 +3085,7 @@ static avifResult avifDecoderPrepareSample(avifDecoder * decoder, avifDecodeSamp avifDecoderItem * item = avifMetaFindItem(decoder->data->meta, sample->itemID); avifROData itemContents; - avifResult readResult = avifDecoderItemRead(item, decoder->io, &itemContents, sample->offset, bytesToRead, &decoder->diag); + avifResult readResult = avifDecoderItemRead(item, decoder->io, &itemContents, (size_t)sample->offset, bytesToRead, &decoder->diag); if (readResult != AVIF_RESULT_OK) { return readResult; }