diff options
author | der richter <der.richter@gmx.de> | 2020-12-20 20:03:12 +0100 |
---|---|---|
committer | der richter <der.richter@gmx.de> | 2021-01-13 16:23:47 +0100 |
commit | bc58361d86e695d3bf875e1dd826f9fbbd586502 (patch) | |
tree | deba27b464142641a036251f4e9f28b0b6f2bcde /drivers | |
parent | d5ab5482a9b35650600ca68bcfee752995e8337b (diff) | |
download | mpv-bc58361d86e695d3bf875e1dd826f9fbbd586502.tar.bz2 mpv-bc58361d86e695d3bf875e1dd826f9fbbd586502.tar.xz |
mac: fix usage of temporary pointers
the pointer used to initialise the respective structs is only guaranteed
to be alive within this constructor. the struct itself is used later and
the data it points to, is not guaranteed to be the same.
to fix this we define a scope that pointer is definitely valid and use
it within this scope. a helper function was added to get the pointers
for several data at once. otherwise we would need to nest
withUnsafeMutableBytes several times, which would make it hard to read.
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions