Are variables
not cached along with frames? For example (forgive the obvious assumptions made, it's just to illustrate the problem):
Code:
#define MAX_DELTA 1
for(int f = 0; f < 100; f++) {
PVideoFrame vf = clip->GetFrame(f, env);
strstream dbg;
dbg << env->GetVarDef("FFPICT_TYPE", AVSValue('?')).AsInt() << ends;
OutputDebugStringA(dbg.str());
dbg.freeze(false);
for(int n = 1, n <= MAX_DELTA; n++)
foo(vf, clip->GetFrame(f + n, env)); // What foo() does isn't really relevant here, just know that it doesn't request any frames
}
If you raise MAX_DELTA, you suddenly get different output for your FFPICT_TYPE vars! This could also be a bug in FFVideoSource() but it seems more likely (to me, anyway) that the variables set when a frame is retrieved are not cached and restored when that frame is requested again and returned from AviSynth+'s cache later on. So, is that the case?
Edit: I can write my own filter in order to rule out (or in) FFVideoSource() as the problem if you'd like.