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

Issue 1419753007: Fix race on demuxer memory usage. Reuse previous calculation. (Closed)

Created:
5 years, 1 month ago by DaleCurtis
Modified:
5 years, 1 month ago
CC:
chromium-reviews, feature-media-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix race on demuxer memory usage. Reuse previous calculation. GetMemoryUsage() is called from the render thread, so access to FFmpegDemuxer internals must be procted. Adding locking everywhere would be a big change, so simply cache the last value when a new packet is added and protect it via a lock. BUG=550375 TEST=all tests pass, no tsan issue. Committed: https://crrev.com/9ac642d1d2ed95b810ff276fb65c2be7b461e791 Cr-Commit-Position: refs/heads/master@{#357464}

Patch Set 1 #

Patch Set 2 : Restyle. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -25 lines) Patch
M media/base/demuxer.h View 1 chunk +2 lines, -1 line 0 comments Download
M media/filters/ffmpeg_demuxer.h View 1 2 chunks +7 lines, -2 lines 0 comments Download
M media/filters/ffmpeg_demuxer.cc View 1 4 chunks +16 lines, -22 lines 0 comments Download

Messages

Total messages: 11 (4 generated)
DaleCurtis
5 years, 1 month ago (2015-11-02 19:50:30 UTC) #3
sandersd (OOO until July 31)
LGTM for fixing the issue, but it's strange to tie the memory statistic computation to ...
5 years, 1 month ago (2015-11-02 20:13:26 UTC) #4
DaleCurtis
How about now? Clarified the naming a bit, calling is unchanged though since those states ...
5 years, 1 month ago (2015-11-02 20:21:00 UTC) #5
sandersd (OOO until July 31)
lgtm
5 years, 1 month ago (2015-11-02 20:24:53 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1419753007/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1419753007/20001
5 years, 1 month ago (2015-11-02 22:12:57 UTC) #9
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 1 month ago (2015-11-02 23:12:33 UTC) #10
commit-bot: I haz the power
5 years, 1 month ago (2015-11-02 23:13:59 UTC) #11
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/9ac642d1d2ed95b810ff276fb65c2be7b461e791
Cr-Commit-Position: refs/heads/master@{#357464}

Powered by Google App Engine
This is Rietveld 408576698