AviSynth / AviSynthPlus

AviSynth with improvements
http://avs-plus.net
977 stars 75 forks source link

C_API plugin destructor and Interleave #386

Closed Asd-g closed 10 months ago

Asd-g commented 10 months ago
source # X.Y resolution
c_plugin # output X1.Y1 resolution
Interleave(source, c_plugin)

In the above case Interleave gives error that both clips must be of the same size but the c_plugin destructor is never triggered. For example, if StackHorizontal is used instead Interleave for this case, the c_plugin destructor is called.

pinterf commented 10 months ago

Yep, StackHorizontal is using std::vector for storing the clips, which gets freed up properly. Interleave is just putting the clip into a PClip* array, which is left unfreed when and exception occurs. I made it similar to StackHorizontal/Vertical, and going to upload to git after some more tests.