Merge pull request #1792 from DolbyLaboratories:dlb/elst-handling/dev

PiperOrigin-RevId: 685851466
This commit is contained in:
Copybara-Service 2024-10-14 15:20:17 -07:00
commit 4df9d4e146
2 changed files with 10 additions and 5 deletions

View file

@ -73,6 +73,11 @@
* Improved frame rate calculation by using media duration from the `mdhd`
box in `Mp4Extractor` and `FragmentedMp4Extractor`
([#1531](https://github.com/androidx/media/issues/1531)).
* Fix incorrect scaling of `media_time` in MP4 edit lists. While
`segment_duration` was already correctly scaled using the movie
timescale, `media_time` is now properly scaled using the track
timescale, as specified by the MP4 format standard
([#1792](https://github.com/androidx/media/issues/1792)).
* DataSource:
* Audio:
* Fix pop sounds that may occur during seeks.

View file

@ -1149,12 +1149,12 @@ public class FragmentedMp4Extractor implements Extractor {
if (track.editListDurations[0] == 0) {
return true;
}
long editListEndMediaTimeUs =
long editListDurationUs =
Util.scaleLargeTimestamp(
track.editListDurations[0] + track.editListMediaTimes[0],
C.MICROS_PER_SECOND,
track.movieTimescale);
return editListEndMediaTimeUs >= track.durationUs;
track.editListDurations[0], C.MICROS_PER_SECOND, track.movieTimescale);
long editListMediaTimeUs =
Util.scaleLargeTimestamp(track.editListMediaTimes[0], C.MICROS_PER_SECOND, track.timescale);
return editListDurationUs + editListMediaTimeUs >= track.durationUs;
}
/**