kassandro
25th May 2003, 14:00
While writing my first filter I stumbled into the following problem with avisynth.h (Avisynth 2.51). It concerns the class PVideoFrame which is just a smart pointer to an object of class VideoFrame. When I pass such a pointer object to a function, a new instance is created, whence the refcount of the underlying VideoFrame is increased. Consequently a call to GetWritePtr() or GetWritePtr(PLANAR_Y) always fails within a function. While this is not a bug, this is certainly not a smooth design. It makes functions of type f(int plane, PVideoFrame vf, ..) impossible, although such filters for a single plane of a frame are quite natural.