diff options
author | Niklas Haas <git@haasn.dev> | 2022-03-06 15:53:47 +0100 |
---|---|---|
committer | Niklas Haas <git@haasn.dev> | 2022-03-06 15:53:47 +0100 |
commit | 7f67a553f68a9df87997fdcb6484ffd243ca2162 (patch) | |
tree | 009a21d8eebf71b43149ecfec947ddeffc1b4028 /waftools | |
parent | 1c49d5735dc5231b9bebcdcab5b182a7e62771d4 (diff) | |
download | mpv-7f67a553f68a9df87997fdcb6484ffd243ca2162.tar.bz2 mpv-7f67a553f68a9df87997fdcb6484ffd243ca2162.tar.xz |
vo_gpu_next: don't allocate dr_buf as part of the AVBufferRef
Some decoders, notably hevcdec, will unconditionally memset() the entire
AVBufferRef based on the AVBufferRef size. This is bad news for us,
since it also overwrites our `struct dr_buf`.
Rewrite this code to make it more robust - keep track of the DR buf
metadata in a separate allocation instead. Has the unfortunate downside
of technically being undefined behavior if `opaque` is not at least 64
bits in size, though, but avoids this issue.
Maybe there's a better way for us to unconditionally keep track of DR
allocation metadata. I could try adding it into the `mp_image` itself.
Maybe on a rainy day. For now, this works.
Fixes #9949
Might fix #9526
Diffstat (limited to 'waftools')
0 files changed, 0 insertions, 0 deletions