jonny
6th March 2003, 20:49
#include<windows.h>
#include<vfw.h>
#include<stdio.h>
void main()
{
PAVIFILE PAviFile;
AVIFILEINFO AviFileInfo;
char *AviFileName = "test.avs";
AVIFileInit();
for (int i = 1; i <= 1000; i++)
{
printf("Open: %i\n", i);
if (AVIFileOpen(&PAviFile, AviFileName, OF_READ, 0) != 0)
{
printf("AVIFileOpen failed\n");
goto Exit;
}
if (AVIFileInfo(PAviFile, &AviFileInfo, sizeof(AviFileInfo)) != 0)
{
printf("AVIFileInfo failed\n");
AVIFileRelease(PAviFile);
goto Exit;
}
else
{
printf(" %ix%i\n", AviFileInfo.dwWidth, AviFileInfo.dwHeight);
}
AVIFileRelease(PAviFile);
}
Exit:
AVIFileExit();
}
I'm using this script and monitoring the memory usage with the Task Manager under Wondows 2000 SP3:
LoadPlugin("c:\yv12\MPEG2Dec3\MPEG2Dec3.dll")
mpeg2source("D:\regina\reg.d2v")
crop(0,72,720,432)
LanczosResize(704,432,0,0.75)
trim(50000, 50999)
Opening/closing the script seems to leak a lot of memory.
The same happen if you open/close more than one time the file with VDubMod.
Using AviSynth 2.0.7 and the usual mpeg2dec works correctly.
I'm using VC 6.0 SP5 to compile the test program:
cl test.cpp /link vfw32.lib
(source + binary attached, simply put test.exe in a folder where you have "test.avs")
Or you can download here: http://jonny.leffe.dnsalias.com/doom9/test.zip
My apologies if i'm missing something, anyway i can't figure out what happen (if this isn't a memory leak)
#include<vfw.h>
#include<stdio.h>
void main()
{
PAVIFILE PAviFile;
AVIFILEINFO AviFileInfo;
char *AviFileName = "test.avs";
AVIFileInit();
for (int i = 1; i <= 1000; i++)
{
printf("Open: %i\n", i);
if (AVIFileOpen(&PAviFile, AviFileName, OF_READ, 0) != 0)
{
printf("AVIFileOpen failed\n");
goto Exit;
}
if (AVIFileInfo(PAviFile, &AviFileInfo, sizeof(AviFileInfo)) != 0)
{
printf("AVIFileInfo failed\n");
AVIFileRelease(PAviFile);
goto Exit;
}
else
{
printf(" %ix%i\n", AviFileInfo.dwWidth, AviFileInfo.dwHeight);
}
AVIFileRelease(PAviFile);
}
Exit:
AVIFileExit();
}
I'm using this script and monitoring the memory usage with the Task Manager under Wondows 2000 SP3:
LoadPlugin("c:\yv12\MPEG2Dec3\MPEG2Dec3.dll")
mpeg2source("D:\regina\reg.d2v")
crop(0,72,720,432)
LanczosResize(704,432,0,0.75)
trim(50000, 50999)
Opening/closing the script seems to leak a lot of memory.
The same happen if you open/close more than one time the file with VDubMod.
Using AviSynth 2.0.7 and the usual mpeg2dec works correctly.
I'm using VC 6.0 SP5 to compile the test program:
cl test.cpp /link vfw32.lib
(source + binary attached, simply put test.exe in a folder where you have "test.avs")
Or you can download here: http://jonny.leffe.dnsalias.com/doom9/test.zip
My apologies if i'm missing something, anyway i can't figure out what happen (if this isn't a memory leak)