mirror of
https://github.com/samsonjs/media.git
synced 2026-03-28 09:55:48 +00:00
Fix E-AC3 output capability check without sample rate
#minor-release
PiperOrigin-RevId: 432189509
(cherry picked from commit a73a9e9ca5)
This commit is contained in:
parent
d20160d751
commit
7afaf97489
1 changed files with 4 additions and 1 deletions
|
|
@ -1739,8 +1739,11 @@ public final class DefaultAudioSink implements AudioSink {
|
|||
// the channel count for this encoding, but before then there is no way to query it so we
|
||||
// assume 6 channel audio is supported.
|
||||
if (Util.SDK_INT >= 29) {
|
||||
// Default to 48 kHz if the format doesn't have a sample rate (for example, for chunkless
|
||||
// HLS preparation). See [Internal: b/222127949].
|
||||
int sampleRate = format.sampleRate != Format.NO_VALUE ? format.sampleRate : 48000;
|
||||
channelCount =
|
||||
getMaxSupportedChannelCountForPassthroughV29(C.ENCODING_E_AC3_JOC, format.sampleRate);
|
||||
getMaxSupportedChannelCountForPassthroughV29(C.ENCODING_E_AC3_JOC, sampleRate);
|
||||
if (channelCount == 0) {
|
||||
Log.w(TAG, "E-AC3 JOC encoding supported but no channel count supported");
|
||||
return null;
|
||||
|
|
|
|||
Loading…
Reference in a new issue