Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@
`ScrubbingModeParameters.allowSkippingMediaCodecFlush` enabled.
* Remove experimental
`DefaultMediaCodecAdapterFactory.setAsyncCryptoSynchronizationEnabled(boolean)`.
* Fix an issue where returning from a client-side inserted ad to a content
period that resumes on a sync sample could reset the renderers
unnecessarily. `ClippingMediaPeriod` no longer reports
`SampleStream.FLAG_HAS_PREROLL` for clips that only set an end position,
where the wrapped period's own report is exact. Only takes effect when
per-stream media progression is enabled
([#3371](https://github.com/androidx/media/issues/3371)).
* CompositionPlayer:
* Support configuring the frame rate of video frame aggregation via
`Composition.Builder.setVideoFrameAggregationParameters` for playback
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,14 @@ public int skipData(long positionUs) {
if (endUs != C.TIME_END_OF_SOURCE) {
flags |= FLAG_STRICT_DURATION;
}
if (hasPreroll) {
// A non-zero clipping start introduces preroll the wrapped period cannot know about, because
// sample streams provide buffers starting at a key-frame that may precede the clipping start
// point. With a zero clipping start the samples delivered are exactly the samples the wrapped
// period delivers, so its own report is exact and must not be overwritten with the
// conservative assumption made by the enable-position heuristic.
// TODO: ProgressiveMediaPeriod reports only Format.hasPrerollSamples, not seek-induced
// preroll, so the wrapped period's report is currently only exact for chunk-based sources.
if (startUs != 0 && hasPreroll) {
flags &= ~FLAG_MAYBE_HAS_PREROLL;
flags |= FLAG_HAS_PREROLL;
}
Expand Down
Loading