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.
This commit is contained in:
arch1t3cht 2023-11-23 09:40:04 +01:00
parent 568597bddc
commit 07fa563fa6

View file

@ -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)