Commit 6174084
committed
Avoid forming deadlock when steam drains upon device switching
This solves the deadlock mentioned in BMO 1572273 comment 6. It's very
likely to have a deadlock when the output callback tries to stop the
input AudioUnit when the input device is unplugged while the output
device is unchanged during a WebRTC call.
One of the thread forming the deadlock is internal so we don't have any
control on it. The only way to free the deadlock is to prevent the
output callback to require the CAMutex tied to the input AudioUnit.
With the change, the input AudioUnit will be stopped in its own callback
so the deadlock won't be formed.1 parent 0b5b52d commit 6174084
1 file changed
Lines changed: 12 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
503 | 503 | | |
504 | 504 | | |
505 | 505 | | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
506 | 517 | | |
507 | 518 | | |
508 | 519 | | |
| |||
522 | 533 | | |
523 | 534 | | |
524 | 535 | | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
| 536 | + | |
531 | 537 | | |
532 | 538 | | |
533 | 539 | | |
| |||
614 | 620 | | |
615 | 621 | | |
616 | 622 | | |
617 | | - | |
618 | | - | |
619 | | - | |
620 | | - | |
621 | 623 | | |
622 | 624 | | |
623 | 625 | | |
| |||
0 commit comments