diff options
Diffstat (limited to 'src/cam/sdl_texture_yuv.cpp')
-rw-r--r-- | src/cam/sdl_texture_yuv.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cam/sdl_texture_yuv.cpp b/src/cam/sdl_texture_yuv.cpp index 431e836d..aa424559 100644 --- a/src/cam/sdl_texture_yuv.cpp +++ b/src/cam/sdl_texture_yuv.cpp @@ -9,6 +9,7 @@ using namespace libcamera; +#if SDL_VERSION_ATLEAST(2, 0, 16) SDLTextureNV12::SDLTextureNV12(const SDL_Rect &rect, unsigned int stride) : SDLTexture(rect, SDL_PIXELFORMAT_NV12, stride) { @@ -19,6 +20,7 @@ void SDLTextureNV12::update(const std::vector<libcamera::Span<const uint8_t>> &d SDL_UpdateNVTexture(ptr_, &rect_, data[0].data(), pitch_, data[1].data(), pitch_); } +#endif SDLTextureYUYV::SDLTextureYUYV(const SDL_Rect &rect, unsigned int stride) : SDLTexture(rect, SDL_PIXELFORMAT_YUY2, stride) |