Bug 1817997 - Update nsAVIFDecoder to use the new mp4parse-rust time units. r=kinetik

Differential Revision: https://phabricator.services.mozilla.com/D176048
This commit is contained in:
Paul Adenot 2023-05-24 13:18:44 +00:00
parent 4116812f6a
commit a9bfcf37e3

View File

@ -298,14 +298,16 @@ static Mp4parseStatus CreateSampleIterator(
Mp4parseAvifParser* aParser, ByteStream* aBuffer, uint32_t trackID,
UniquePtr<SampleIterator>& aIteratorOut) {
Mp4parseByteData data;
Mp4parseStatus rv = mp4parse_avif_get_indice_table(aParser, trackID, &data);
uint64_t timescale;
Mp4parseStatus rv =
mp4parse_avif_get_indice_table(aParser, trackID, &data, &timescale);
if (rv != MP4PARSE_STATUS_OK) {
return rv;
}
UniquePtr<IndiceWrapper> wrapper = MakeUnique<IndiceWrapper>(data);
RefPtr<MP4SampleIndex> index =
new MP4SampleIndex(*wrapper, aBuffer, trackID, false);
RefPtr<MP4SampleIndex> index = new MP4SampleIndex(
*wrapper, aBuffer, trackID, false, AssertedCast<int32_t>(timescale));
aIteratorOut = MakeUnique<SampleIterator>(index);
return MP4PARSE_STATUS_OK;
}