Log in

View Full Version : Possible a small bug in writefile()


Valeron
1st May 2007, 19:42
since i'm going to use this script to recorde comb frames after tfm, i found it can't write anything to the file i specified
orig=MPEG2Source("DVD01_pro.d2v").assumetff()
orig=orig.tfm(slow=2,PP=0)
v1=orig
v2=orig.writefile("comb_frame_recorde.txt","current_frame",append=true)
conditionalfilter(orig,v2,v1,"IscombedTIVTC(cthresh=10,MI=85)","equals","true")

it only works after i specified the whole path like this
orig=MPEG2Source("DVD01_pro.d2v").assumetff()
orig=orig.tfm(slow=2,PP=0)
v1=orig
v2=orig.writefile("E:\DVDTemp_01\comb_frame_recorde.txt","current_frame",append=true)
conditionalfilter(orig,v2,v1,"IscombedTIVTC(cthresh=10,MI=85)","equals","true")

AVS 2.5.7 official build installed.

IanB
3rd May 2007, 05:10
Yes it is a known problem, you have to use the full path.

The file either doesn't get created or ends up somewhere weird on your disk, i.e. Windows, System, Program Files\...

ChiDragon
3rd May 2007, 14:07
IanB, has the problem been fixed in CVS or something yet? I noticed the same thing happening with output files of plugins I'm working on. I saw the "_fullpath" function (declared in stdlib.h) being used in TFM and using that fixed it for my stuff.

IanB
4th May 2007, 04:05
Thanks, we'll give it a try.