Skip to content

Commit

Permalink
utils/libav: don't pollute namespace
Browse files Browse the repository at this point in the history
Prefix this #define
  • Loading branch information
haasn committed Feb 13, 2023
1 parent 462ec51 commit 2b0931b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/include/libplacebo/utils/libav_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(57, 8, 100) && \
defined(PL_HAVE_VULKAN) && defined(VK_API_VERSION_1_2)
# define HAVE_LAV_VULKAN
# define PL_HAVE_LAV_VULKAN
# include <libavutil/hwcontext_vulkan.h>
# include <libplacebo/vulkan.h>
#endif
Expand Down Expand Up @@ -504,7 +504,7 @@ static inline bool pl_test_pixfmt(pl_gpu gpu, enum AVPixelFormat pixfmt)
case AV_PIX_FMT_VAAPI:
return gpu->import_caps.tex & PL_HANDLE_DMA_BUF;

#ifdef HAVE_LAV_VULKAN
#ifdef PL_HAVE_LAV_VULKAN
case AV_PIX_FMT_VULKAN:
return pl_vulkan_get(gpu);
#endif
Expand Down Expand Up @@ -933,7 +933,7 @@ static bool pl_map_avframe_derived(pl_gpu gpu, struct pl_frame *out,
return false;
}

#ifdef HAVE_LAV_VULKAN
#ifdef PL_HAVE_LAV_VULKAN
static bool pl_acquire_avframe(pl_gpu gpu, struct pl_frame *frame)
{
const AVFrame *avframe = frame->user_data;
Expand Down Expand Up @@ -1068,7 +1068,7 @@ static inline bool pl_map_avframe_internal(pl_gpu gpu, struct pl_frame *out,
goto error;
return true;

#ifdef HAVE_LAV_VULKAN
#ifdef PL_HAVE_LAV_VULKAN
case AV_PIX_FMT_VULKAN:
if (!pl_map_avframe_vulkan(gpu, out, frame))
goto error;
Expand Down Expand Up @@ -1139,7 +1139,7 @@ static inline void pl_unmap_avframe(pl_gpu gpu, struct pl_frame *frame)
if (!avframe)
goto done;

#ifdef HAVE_LAV_VULKAN
#ifdef PL_HAVE_LAV_VULKAN
if (avframe->format == AV_PIX_FMT_VULKAN)
pl_unmap_avframe_vulkan(gpu, frame);
#endif
Expand Down

0 comments on commit 2b0931b

Please sign in to comment.