From 42658030a444f721be02ab31595d704a64373fe0 Mon Sep 17 00:00:00 2001 From: jojo61 Date: Sun, 19 Oct 2025 15:28:18 +0200 Subject: [PATCH] Support FFMPEG Version 8.1 --- softhdcuvid.cpp | 2 +- video.c | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/softhdcuvid.cpp b/softhdcuvid.cpp index 5efb995..78a87bf 100644 --- a/softhdcuvid.cpp +++ b/softhdcuvid.cpp @@ -61,7 +61,7 @@ extern void ToggleLUT(); /// vdr-plugin version number. /// Makefile extracts the version number for generating the file name /// for the distribution archive. -static const char *const VERSION = "3.31" +static const char *const VERSION = "3.32" #ifdef GIT_REV "-GIT" GIT_REV #endif diff --git a/video.c b/video.c index f38ed8e..c1337d0 100644 --- a/video.c +++ b/video.c @@ -2893,7 +2893,11 @@ static enum AVPixelFormat Cuvid_get_format(CuvidDecoder *decoder, AVCodecContext bitformat16 = 1; } #ifdef VAAPI +#if (LIBAVCODEC_VERSION_INT > AV_VERSION_INT(62, 11, 100)) + if (video_ctx->profile == AV_PROFILE_HEVC_MAIN_10) +#else if (video_ctx->profile == FF_PROFILE_HEVC_MAIN_10) +#endif bitformat16 = 1; #endif @@ -6099,15 +6103,7 @@ void VideoReleaseSurface(VideoHwDecoder *hw_decoder, unsigned surface) { /// enum AVPixelFormat Video_get_format(VideoHwDecoder *hw_decoder, AVCodecContext *video_ctx, const enum AVPixelFormat *fmt) { -#ifdef DEBUG - int ms_delay; - // FIXME: use frame time - ms_delay = (1000 * video_ctx->time_base.num * video_ctx->ticks_per_frame) / video_ctx->time_base.den; - - Debug(3, "video: ready %s %2dms/frame %dms\n", Timestamp2String(VideoGetClock(hw_decoder)), ms_delay, - GetMsTicks() - VideoSwitch); -#endif return VideoUsedModule->get_format(hw_decoder, video_ctx, fmt); }