djcel
17th June 2008, 20:25
I use the last version of XviD (v1.1.3) on Windows XP/Vista
I built an application to list the video codecs by using the Win32 C++ function:
ICCompressorChoose()
So it loads xvidvfw.dll (Encoding part)
The problem is that I have a crash with the win32 function only with the XviD codec.
Exception: c0000005
"Memory can't be read"
Instruction: 0x023B97a8
Adress: 0x023e3f60
so I guess it's: MOV EDX,DWORD PTR DS:[ESI+1048] and ESI can't be read
It looks like a thread or a Window not correctly closed to my mind (I guess when the codec is loaded by the function, it opens a thread/window in the background but when we exit the function, the thread/window is not destroyed).
I have tried to look at the source code of xvidvfw.dll but I don't know where the problem could come from.
Here is my code:
COMPVARS cv;
ZeroMemory(&cv, sizeof(COMPVARS));
cv.cbSize = sizeof(COMPVARS);
cv.dwFlags = ICMF_COMPVARS_VALID;
cv.fccType = ICTYPE_VIDEO;
cv.fccHandler=GetDlgItemInt(hDlg,IDC_EDIT16,NULL,FALSE);
cv.lDataRate=GetDlgItemInt(hDlg,IDC_EDIT17,NULL,FALSE); // desired data rate KB/Sec
cv.lKey=GetDlgItemInt(hDlg,IDC_EDIT18,NULL,FALSE); // key frames how often?
cv.lQ=GetDlgItemInt(hDlg,IDC_EDIT19,NULL,FALSE); // desired quality*/
BOOL bSelect = ICCompressorChoose(hDlg, ICMF_CHOOSE_DATARATE | ICMF_CHOOSE_KEYFRAME, NULL,NULL,&cv,"Choose a codec for AVI file");
if (bSelect==FALSE) return;
But there is no problem with my function. I followed with a debugger and the crash appears when I exit my application. My debugger also found a lot of exceptions in xvidvfw.dll
Could someone have a look?
I built an application to list the video codecs by using the Win32 C++ function:
ICCompressorChoose()
So it loads xvidvfw.dll (Encoding part)
The problem is that I have a crash with the win32 function only with the XviD codec.
Exception: c0000005
"Memory can't be read"
Instruction: 0x023B97a8
Adress: 0x023e3f60
so I guess it's: MOV EDX,DWORD PTR DS:[ESI+1048] and ESI can't be read
It looks like a thread or a Window not correctly closed to my mind (I guess when the codec is loaded by the function, it opens a thread/window in the background but when we exit the function, the thread/window is not destroyed).
I have tried to look at the source code of xvidvfw.dll but I don't know where the problem could come from.
Here is my code:
COMPVARS cv;
ZeroMemory(&cv, sizeof(COMPVARS));
cv.cbSize = sizeof(COMPVARS);
cv.dwFlags = ICMF_COMPVARS_VALID;
cv.fccType = ICTYPE_VIDEO;
cv.fccHandler=GetDlgItemInt(hDlg,IDC_EDIT16,NULL,FALSE);
cv.lDataRate=GetDlgItemInt(hDlg,IDC_EDIT17,NULL,FALSE); // desired data rate KB/Sec
cv.lKey=GetDlgItemInt(hDlg,IDC_EDIT18,NULL,FALSE); // key frames how often?
cv.lQ=GetDlgItemInt(hDlg,IDC_EDIT19,NULL,FALSE); // desired quality*/
BOOL bSelect = ICCompressorChoose(hDlg, ICMF_CHOOSE_DATARATE | ICMF_CHOOSE_KEYFRAME, NULL,NULL,&cv,"Choose a codec for AVI file");
if (bSelect==FALSE) return;
But there is no problem with my function. I followed with a debugger and the crash appears when I exit my application. My debugger also found a lot of exceptions in xvidvfw.dll
Could someone have a look?