You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1.1 KiB

  1. From 72f9db7bd75f03e9e7afeaaa0aa0ab7af9fe81a5 Mon Sep 17 00:00:00 2001
  2. From: Yuri Timenkov <yuri@timenkov.ru>
  3. Date: Sun, 26 Jul 2020 12:17:15 +0000
  4. Subject: [PATCH] Fixed build with ffmnpeg but without thumbnailer
  5. Fixes: #953
  6. ---
  7. src/metadata/ffmpeg_handler.cc | 3 ++-
  8. 1 file changed, 2 insertions(+), 1 deletion(-)
  9. diff --git a/src/metadata/ffmpeg_handler.cc b/src/metadata/ffmpeg_handler.cc
  10. index 4bba5655..e0ff84bb 100644
  11. --- a/src/metadata/ffmpeg_handler.cc
  12. +++ b/src/metadata/ffmpeg_handler.cc
  13. @@ -265,6 +265,8 @@ void FfmpegHandler::fillMetadata(std::shared_ptr<CdsItem> item)
  14. avformat_close_input(&pFormatCtx);
  15. }
  16. +#ifdef HAVE_FFMPEGTHUMBNAILER
  17. +
  18. fs::path getThumbnailCacheBasePath(Config& config)
  19. {
  20. if (auto configuredDir = config.getOption(CFG_SERVER_EXTOPTS_FFMPEGTHUMBNAILER_CACHE_DIR);
  21. @@ -284,7 +286,6 @@ fs::path getThumbnailCachePath(const fs::path& base, const fs::path& movie)
  22. return path;
  23. }
  24. -#ifdef HAVE_FFMPEGTHUMBNAILER
  25. std::optional<std::vector<std::byte>> FfmpegHandler::readThumbnailCacheFile(const fs::path& movie_filename) const
  26. {
  27. auto path = getThumbnailCachePath(getThumbnailCacheBasePath(*config), movie_filename);