Merge pull request #17777 from JesseTG/jtg/fix-ffmpeg-camera-condition

This commit is contained in:
LibretroAdmin 2025-04-07 02:33:31 -07:00 committed by GitHub
commit aca2d3a544
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 1 deletions

View File

@ -27,6 +27,12 @@
#include "camera_driver.h"
#if defined(HAVE_FFMPEG) && defined(HAVE_AVFORMAT) && defined(HAVE_AVCODEC) && \
defined(HAVE_AVDEVICE) && defined(HAVE_AVUTIL) && defined(HAVE_SWSCALE)
/* FFMPEG consists of several libraries, and the camera driver needs most of them */
#define HAVE_FFMPEG_CAMERA
#endif
static void *nullcamera_init(const char *device, uint64_t caps,
unsigned width, unsigned height) { return (void*)-1; }
static void nullcamera_free(void *data) { }
@ -61,7 +67,7 @@ const camera_driver_t *camera_drivers[] = {
#ifdef HAVE_AVF
&camera_avfoundation,
#endif
#ifdef HAVE_FFMPEG
#ifdef HAVE_FFMPEG_CAMERA
&camera_ffmpeg,
#endif
&camera_null,