kassandro
3rd June 2003, 09:07
There is a problem with the function IScriptEnvironment::AddFunction in Avisynth 2.52 and probably in earlier versions. When I call this function with IScriptEnvironment::AddFunction(myfilter, myoptions, ...), then Avisynth doesnīt copy the string myoptions. Instead it only saves the pointer of the string. Thus, if the string myoptions is changed after the function call, the string in Avisynth gets changed as well. This is certainly not intended. The situation is even worse, if myoptions was only allocated in temporary memory. Then Avisynth may even crash. Probably the same applies to the string myfilter, but I havenīt checked it.