Skip to content

Commit

Permalink
Reconfigure audio sink when PCM encoding changes
Browse files Browse the repository at this point in the history
Note:
- Fixing this uncovers another bug in how audio processor draining
  works, so the test playlist still doesn't play correctly after this
  change.
- Once we reconfigure the audio sink based on the ExoPlayer Format
  rather than the codec MediaFormat in a later change, this change can
  be reverted.

Issue: #6601
PiperOrigin-RevId: 281264149
  • Loading branch information
andrewlewis authored and ojw28 committed Nov 22, 2019
1 parent 774ccaf commit dbd7e05
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
* Use `ExoMediaDrm.Provider` in `OfflineLicenseHelper` to avoid `ExoMediaDrm`
leaks ([#4721](https://github.com/google/ExoPlayer/issues/4721)).
* Fix byte order of HDR10+ static metadata to match CTA-861.3.
* Reconfigure audio sink when PCM encoding changes
([#6601](https://github.com/google/ExoPlayer/issues/6601)).
* Make `MediaSourceEventListener.LoadEventInfo` a top-level class.

### 2.11.0 (not yet released) ###
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,7 @@ protected boolean canKeepCodecWithFlush(Format oldFormat, Format newFormat) {
return Util.areEqual(oldFormat.sampleMimeType, newFormat.sampleMimeType)
&& oldFormat.channelCount == newFormat.channelCount
&& oldFormat.sampleRate == newFormat.sampleRate
&& oldFormat.pcmEncoding == newFormat.pcmEncoding
&& oldFormat.initializationDataEquals(newFormat)
&& !MimeTypes.AUDIO_OPUS.equals(oldFormat.sampleMimeType);
}
Expand Down

0 comments on commit dbd7e05

Please sign in to comment.