Skip to content

Commit

Permalink
fix #553
Browse files Browse the repository at this point in the history
  • Loading branch information
kingslay committed Sep 18, 2023
1 parent 522385a commit 114da4b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Sources/KSPlayer/MEPlayer/Resample.swift
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,12 @@ public class AudioDescriptor: Equatable {
layoutTag = tag
} else {
av_channel_layout_default(&outChannel, Int32(channels))
layoutTag = outChannel.layoutTag!
if let tag = outChannel.layoutTag {
layoutTag = tag
} else {
av_channel_layout_default(&outChannel, 2)
layoutTag = outChannel.layoutTag!
}
}
KSLog("[audio] out channelLayout: \(outChannel)")
var commonFormat: AVAudioCommonFormat
Expand Down

0 comments on commit 114da4b

Please sign in to comment.