commit | 18913be048b0f7c5d651f7b1729c2262536f0358 | [log] [tgz] |
---|---|---|
author | Armando Miraglia <armax@webrtc.org> | Mon Mar 16 12:10:26 2020 |
committer | Commit Bot <commit-bot@chromium.org> | Tue Mar 24 09:06:01 2020 |
tree | e8e55b4b22582851fef920f0323dd2978b9b2d2d | |
parent | 7a0e44c1a84fb4ed57a6701cfc8093756c37af6f [diff] |
[Merge to M80] - [DirectX] Fix vector allocation for raw data handling. std::vector::reserve has the effect to reserve space in memory but does not affect the result of size(), which keeps on returning 0. If size is 0, however, data() might either return null or not [1]. This CL fixes the use of reserve() in favour of resize() which effectively allocates the memory in the vector and updates its size. This way size() returns a value bigger than 0 and data() returns a valid pointer. [1] https://en.cppreference.com/w/cpp/container/vector/data TBR=jamiewalch@chromium.org (cherry picked from commit b52f7fb5933a098c48f907bb488ef3097c1c4bd9) No-Try: True Fixed: chromium:1059764 Change-Id: Ida3dbe643710c6895f09b9da87b0075b7d7b28df Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170470 Reviewed-by: Jamie Walch <jamiewalch@chromium.org> Commit-Queue: Armando Miraglia <armax@webrtc.org> Cr-Original-Commit-Position: refs/heads/master@{#30836} Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171505 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Armando Miraglia <armax@webrtc.org> Cr-Commit-Position: refs/branch-heads/3987@{#7} Cr-Branched-From: 1256d9bcac500d962e884231b0360d8c3eb3ef02-refs/heads/master@{#30022}
WebRTC is a free, open software project that provides browsers and mobile applications with Real-Time Communications (RTC) capabilities via simple APIs. The WebRTC components have been optimized to best serve this purpose.
Our mission: To enable rich, high-quality RTC applications to be developed for the browser, mobile platforms, and IoT devices, and allow them all to communicate via a common set of protocols.
The WebRTC initiative is a project supported by Google, Mozilla and Opera, amongst others.
See http://www.webrtc.org/native-code/development for instructions on how to get started developing with the native code.
Authoritative list of directories that contain the native API header files.