pinterf / mvtools

mvtools plugin for avisynth
155 stars 17 forks source link

video source file handle not released [v2.7.1.22+] #5

Closed rhinolophus closed 7 years ago

rhinolophus commented 7 years ago

Hello everybody, after running an .avs script with mvtools2 (x86, 2.7.1.22+) the audio and video source file handles are not being released.

e.g. after opening and closing the .avs file in AvsPmod, VirtulDub or after encoding the video with MeGUI the main application still has open handles to the audio and video source files (preventing me from deleting them without closing the application).

It turned out that (at least) MDegrain1 is causing this problem. Example script from the docs to reproduce:

LoadPlugin("mvtools2.dll")
AVISource("sample.avi")

fields = AssumeTFF().SeparateFields()
super = MSuper(fields)
backward_vec2 = MAnalyse(super, isb=true, delta=2, overlap=2)
forward_vec2 = MAnalyse(super, isb=false, delta=2, overlap=2)
MDegrain1(fields, super, backward_vec2, forward_vec2, thSAD=400)
Weave()

This bug / behavior was introduced in version 2.7.1.22 previous versions are running fine. Any ideas?

pinterf commented 7 years ago

Q1: Does the problem it still exist in 2.7.20.22? I'm a bit surprised because mvtools has nothing to do with source files. Avisource opens them. Q2: The previous version you are mentioning are 2.7.0.22d for example? Q3: Which Avisynth version are you using? Thanks

rhinolophus commented 7 years ago

A1: yes, for all versions from 2.7.1.22 up to the latest 2.7.20.22 A2: yes, exactly 2.7.0.22d and below A3: the latest official build from Sourceforge v2.60 (32-bit, single threaded) AviSynth 2.60, build:Mar 31 2015 [16:38:54] running on Win7 x64

This happens with other source filters too (LSMASH, FFmpegSource) I know that it is weird since mvtools2 does not access the media files directly, but running the script without MDegrain1 will release all files as expected (just like running without mvtools2 at all obviously). very strange...

pinterf commented 7 years ago

Fixed in 2.7.22