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
Родитель 4116812f6a
Коммит a9bfcf37e3
1 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

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