commit | 9ac642d1d2ed95b810ff276fb65c2be7b461e791 | [log] [tgz] |
---|---|---|
author | dalecurtis <dalecurtis@chromium.org> | Mon Nov 02 23:12:26 2015 |
committer | Commit bot <commit-bot@chromium.org> | Mon Nov 02 23:13:49 2015 |
tree | 54db4e9f92caffa03bb3e4a4f7604fd11cffefb2 | |
parent | f4a1ecac9ff3ff53f42810faf64a519cbbc7db45 [diff] |
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. Review URL: https://codereview.chromium.org/1419753007 Cr-Commit-Position: refs/heads/master@{#357464}