From 07fa563fa6208bd1fdef9b9c13f1c3e2bd5d3be1 Mon Sep 17 00:00:00 2001 From: arch1t3cht Date: Thu, 23 Nov 2023 09:40:04 +0100 Subject: [PATCH] vapoursynth: Ignore __aegi_timecodes on single-frame clips The vfr class (understandably) does not like timecode lists with only one element, so the current default script breaks when opening images. So to not bloat the default script too much we just ignore __aegi_timecodes in the provider in these cases. --- src/video_provider_vs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video_provider_vs.cpp b/src/video_provider_vs.cpp index a59c583e1..c0d432227 100644 --- a/src/video_provider_vs.cpp +++ b/src/video_provider_vs.cpp @@ -209,7 +209,7 @@ VapourSynthVideoProvider::VapourSynthVideoProvider(agi::fs::path const& filename } } - if (numtc != -1) { + if (numtc != -1 && vi->numFrames > 1) { const int64_t *tcs = vs.GetAPI()->mapGetIntArray(clipinfo, tc_key, &err1); const char *tcs_path = vs.GetAPI()->mapGetData(clipinfo, tc_key, 0, &err2); if (err1 && err2)