mirror of
https://github.com/samsonjs/media.git
synced 2026-03-25 09:25:53 +00:00
Fix handling of repeated EOS in SilenceSkippingAudioProcessor.
Issue: androidx/media#712 PiperOrigin-RevId: 589882412
This commit is contained in:
parent
d356d88c4f
commit
90a0cbdf3d
2 changed files with 6 additions and 1 deletions
|
|
@ -54,6 +54,8 @@
|
|||
`ROLE_FLAG_ALTERNATE` to prevent them being automatically selected for
|
||||
playback because of their higher resolution.
|
||||
* Audio:
|
||||
* Fix handling of EOS for `SilenceSkippingAudioProcessor` when called
|
||||
multiple times ([#712](https://github.com/androidx/media/issues/712)).
|
||||
* Video:
|
||||
* Add workaround for a device issue on Galaxy Tab S7 FE, Chromecast with
|
||||
Google TV, and Lenovo M10 FHD Plus that causes 60fps AVC streams to be
|
||||
|
|
|
|||
|
|
@ -189,8 +189,11 @@ public final class SilenceSkippingAudioProcessor extends BaseAudioProcessor {
|
|||
@Override
|
||||
protected void onQueueEndOfStream() {
|
||||
if (maybeSilenceBufferSize > 0) {
|
||||
// We haven't received enough silence to transition to the silent state, so output the buffer.
|
||||
// We haven't received enough silence to transition to the silent state, so output the buffer
|
||||
// and switch back to the noisy state.
|
||||
output(maybeSilenceBuffer, maybeSilenceBufferSize);
|
||||
maybeSilenceBufferSize = 0;
|
||||
state = STATE_NOISY;
|
||||
}
|
||||
if (!hasOutputNoise) {
|
||||
skippedFrames += paddingSize / bytesPerFrame;
|
||||
|
|
|
|||
Loading…
Reference in a new issue