Skip to content

Commit

Permalink
webrtc: fix audio handling on unrecognized codec
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Apr 13, 2024
1 parent c1c9fec commit 9c0d253
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions plugins/webrtc/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion plugins/webrtc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scrypted/webrtc",
"version": "0.2.22",
"version": "0.2.23",
"scripts": {
"scrypted-setup-project": "scrypted-setup-project",
"prescrypted-setup-project": "scrypted-package-json",
Expand Down
2 changes: 1 addition & 1 deletion plugins/webrtc/src/rtp-forwarders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ export async function startRtpForwarderProcess(console: Console, ffmpegInput: FF
}

const audioSections = parsedSdp.msections.filter(msection => msection.type === 'audio');
let audioSection = audioSections.find(msection => msection.codec === audioCodec || audioCodec === 'copy');
let audioSection = audioSections.find(msection => (msection.codec && msection.codec === audioCodec) || audioCodec === 'copy');
if (!audioSection) {
for (const check of audioSections) {
if (await audio?.negotiate?.(check) === true) {
Expand Down

0 comments on commit 9c0d253

Please sign in to comment.