Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Issue 2439283002: Elimiteted race condition in the AudioMixer. (Closed)

Created:
4 years, 2 months ago by aleloi
Modified:
4 years, 1 month ago
Reviewers:
ivoc
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com, hlundin-webrtc
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Elimiteted race condition in the AudioMixer. The mixer allocates an audio frame for each added data source. This audio frame was deallocated when a source was removed from the mixer. Source removal could happen during the mixing, and the existing locking scheme (and the Clang thread checker) was not sufficient to prevent a data race. After this change, the mixer doesn't release its lock until it is finished with the sources' Audio frames. Since multi-threaded access to the mixer only happens when a source is added or removed, we believe that this change wouldn't have any noticeable performance impact. NOTRY=True BUG=webrtc:6346 Committed: https://crrev.com/1655e45d85be0ecbf172115031bdbbc88a65c1b2 Cr-Commit-Position: refs/heads/master@{#14744}

Patch Set 1 #

Patch Set 2 : Removed previous change, now holding lock a little longer. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -12 lines) Patch
M webrtc/modules/audio_mixer/audio_mixer_impl.h View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_mixer/audio_mixer_impl.cc View 1 1 chunk +11 lines, -11 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 12 (7 generated)
aleloi
Please take a look!
4 years, 1 month ago (2016-10-24 09:41:26 UTC) #3
ivoc
Nice, lgtm!
4 years, 1 month ago (2016-10-24 11:03:30 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2439283002/40001
4 years, 1 month ago (2016-10-24 13:55:05 UTC) #8
commit-bot: I haz the power
Committed patchset #2 (id:40001)
4 years, 1 month ago (2016-10-24 13:57:00 UTC) #10
commit-bot: I haz the power
4 years, 1 month ago (2016-10-24 13:57:11 UTC) #12
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/1655e45d85be0ecbf172115031bdbbc88a65c1b2
Cr-Commit-Position: refs/heads/master@{#14744}

Powered by Google App Engine
This is Rietveld 408576698