1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-22 07:46:55 +00:00
mpv/video/out/d3d11
James Ross-Gowan 80552ab28e vo_gpu: d3d11: fix storage lifetime of compound literals
Somehow I got the idea that compound literals had function-scoped
lifetime. Instead, like all other objects with automatic storage
duration, compound literals are block-scoped, so they become invalid
after exiting the block they were declared in. It seems like a recent
change to GCC actually reuses the memory that the compound literals
used to occupy, which was causing a few bugs.

The pattern of conditionally assigning a pointer to a compound literal
was used in a few places in ra_d3d11 where the Direct3D API expects
either a pointer to an initialised struct or NULL. Change these to
ensure the lifetime of the struct includes the API call.

Should fix #6775.
2019-08-20 18:12:21 +10:00
..
context.c vo_gpu: d3d11: implement tex_download() 2018-02-13 21:25:15 +11:00
hwdec_d3d11va.c video: rewrite filtering glue code 2018-01-30 03:10:27 -08:00
hwdec_dxva2dxgi.c vo_gpu: hwdec_dxva2dxgi: initial implementation 2018-01-06 11:26:15 +11:00
ra_d3d11.c vo_gpu: d3d11: fix storage lifetime of compound literals 2019-08-20 18:12:21 +10:00
ra_d3d11.h vo_gpu: hwdec_d3d11va: allow zero-copy video decoding 2017-11-07 20:27:13 +11:00