Skip to content

Commit

Permalink
When the HLS container format is not packed audio, reset timestmap of…
Browse files Browse the repository at this point in the history
…fset

Issue:#6444
PiperOrigin-RevId: 270252126
  • Loading branch information
AquilesCanta authored and ojw28 committed Sep 20, 2019
1 parent 47bfa06 commit c9fc0da
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
* Support unwrapping of nested metadata (e.g. ID3 and SCTE-35 in EMSG).
* Add `HttpDataSource.getResponseCode` to provide the status code associated
with the most recent HTTP response.
* Fix transitions between packed audio and non-packed audio segments in HLS
([#6444](https://github.com/google/ExoPlayer/issues/6444)).
* Fix issue where a request would be retried after encountering an error, even
though the `LoadErrorHandlingPolicy` classified the error as fatal.
* Fix initialization data handling for FLAC in MP4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,10 @@ private DefaultExtractorInput prepareExtraction(DataSource dataSource, DataSpec
id3Timestamp != C.TIME_UNSET
? timestampAdjuster.adjustTsTimestamp(id3Timestamp)
: startTimeUs);
} else {
// In case the container format changes mid-stream to non-packed-audio, we need to reset
// the timestamp offset.
output.setSampleOffsetUs(/* sampleOffsetUs= */ 0L);
}
output.init(uid, shouldSpliceIn, /* reusingExtractor= */ false);
extractor.init(output);
Expand Down

0 comments on commit c9fc0da

Please sign in to comment.