-
Notifications
You must be signed in to change notification settings - Fork 337
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle output format changes for empty sample streams correctly
When MediaCodecRenderer is given an empty sample stream, it puts its output format change tracking in a bad state where we never process future stream changes because we are waiting for a sample that doesn't exist. We can fix this by: - Looping the pending output stream changes to see if we processed more than one change at once (this fixes the tracking for empty sample streams that are not the first in the queue). - Checking if none of the previous streams queued any samples in onStreamChanged to handle this in the same way as the case where we already output all samples (this fixes the problem when the empty sample stream comes first in the queue). - Also calling onProcessedStreamChange for the case above, which was missing previously. #minor-release PiperOrigin-RevId: 519226637 (cherry picked from commit b9790e6)
- Loading branch information
1 parent
690ac23
commit 56dd0f7
Showing
2 changed files
with
123 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters