mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Don't check offload support for formats without defined sample rate.
Otherwise the Builder of AudioFormat will throw because we pass in an invalid value. #minor-release PiperOrigin-RevId: 535169406
This commit is contained in:
parent
2c07468908
commit
418b2a5f1b
1 changed files with 1 additions and 1 deletions
|
|
@ -71,7 +71,7 @@ public final class DefaultAudioOffloadSupportProvider
|
||||||
checkNotNull(format);
|
checkNotNull(format);
|
||||||
checkNotNull(audioAttributes);
|
checkNotNull(audioAttributes);
|
||||||
|
|
||||||
if (Util.SDK_INT < 29) {
|
if (Util.SDK_INT < 29 || format.sampleRate == Format.NO_VALUE) {
|
||||||
return AudioOffloadSupport.DEFAULT_UNSUPPORTED;
|
return AudioOffloadSupport.DEFAULT_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue