From 9925667f68296c42c4336ca97ac4e2e15f1c93b4 Mon Sep 17 00:00:00 2001 From: Paul Adenot Date: Wed, 17 May 2023 15:47:08 +0000 Subject: [PATCH] Bug 1817997 - Update nsAVIFDecoder to use the new mp4parse-rust time units. r=kinetik Differential Revision: https://phabricator.services.mozilla.com/D176048 --- image/decoders/nsAVIFDecoder.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/image/decoders/nsAVIFDecoder.cpp b/image/decoders/nsAVIFDecoder.cpp index 0ccac596e272..07f5a69dc14e 100644 --- a/image/decoders/nsAVIFDecoder.cpp +++ b/image/decoders/nsAVIFDecoder.cpp @@ -298,14 +298,16 @@ static Mp4parseStatus CreateSampleIterator( Mp4parseAvifParser* aParser, ByteStream* aBuffer, uint32_t trackID, UniquePtr& 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, ×cale); if (rv != MP4PARSE_STATUS_OK) { return rv; } UniquePtr wrapper = MakeUnique(data); - RefPtr index = - new MP4SampleIndex(*wrapper, aBuffer, trackID, false); + RefPtr index = new MP4SampleIndex( + *wrapper, aBuffer, trackID, false, AssertedCast(timescale)); aIteratorOut = MakeUnique(index); return MP4PARSE_STATUS_OK; }