[vlc-devel] [PATCH] d3d11_adjust: Pass a non-const pointer to atomic_load

Martin Storsjö martin at martin.st
Mon Feb 19 13:42:50 CET 2018


This fixes compilation with clang, which previously errored
out with this message:

error: address argument to atomic operation must be a pointer to non-const _Atomic
      type ('const atomic_int *' (aka 'const _Atomic(int) *') invalid)
    int level = atomic_load(&p_level->level);
                ^           ~~~~~~~~~~~~~~~
---
 modules/hw/d3d11/d3d11_filters.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/hw/d3d11/d3d11_filters.c b/modules/hw/d3d11/d3d11_filters.c
index 643ab7f..9678603 100644
--- a/modules/hw/d3d11/d3d11_filters.c
+++ b/modules/hw/d3d11/d3d11_filters.c
@@ -135,7 +135,7 @@ static int assert_ProcessorInput(filter_t *p_filter, picture_sys_t *p_sys_src)
 
 static bool ApplyFilter( filter_sys_t *p_sys,
                          D3D11_VIDEO_PROCESSOR_FILTER filter,
-                         const struct filter_level *p_level,
+                         struct filter_level *p_level,
                          ID3D11VideoProcessorInputView *input,
                          ID3D11VideoProcessorOutputView *output,
                          const video_format_t *fmt)
-- 
2.7.4



More information about the vlc-devel mailing list