Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
6th March 2003, 20:49 | #1 | Link |
Registered User
Join Date: Feb 2002
Location: Italy
Posts: 876
|
Memory leak with MPEG2Dec3 v1.00?
Code:
#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(); } Code:
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) 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: Code:
cl test.cpp /link vfw32.lib 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) Last edited by jonny; 15th May 2003 at 14:02. |
Thread Tools | Search this Thread |
Display Modes | |
|
|