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-17 15:47:08 +00:00
Родитель 4fb539144c
Коммит 9925667f68
1 изменённых файлов: 5 добавлений и 3 удалений

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

@ -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;
}