1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-13 19:03:52 +02:00
openwrt-packages/multimedia/gerbera/patches/010-ffmpeg.patch
Rosen Penev 2e44682349
gerbera: add support for ffmpeg
Requires BUILD_PATENTED.

Added patch to fix compilation with it.

Removed include file hack. It's incorrect and it's also npupnp that
needs fixing.

Refreshed npupnp patch to the newest version sent upstream.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-07-26 20:56:47 -07:00

32 lines
1.1 KiB
Diff

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