Bug Report DirectShow Source with incorrect VIDEOINFOHEADER

R1CH

Forum Admin
Developer
It seems that the DirectShow Source plugin sets the output format without verifying that the VIDEOINFOHEADER of the bestOutput->mediaType actually matches the requested width / height. This causes an access violation when attempting to transfer the capture data to the DX texture since the capture buffer is smaller than expected.

I'm not very familiar with DirectShow or device graphs etc so I'm not sure if this is the correct solution, but adding something like the following at line 168 of DeviceSource.cpp seemed to fix the issue for me:

Code:
	vih->bmiHeader.biWidth = cx;
	vih->bmiHeader.biHeight = cy;
	vih->bmiHeader.biSizeImage = cx * cy * bpp;
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
Ah, very nice to have another dev around to smack some sense into me. Yea, you're right. Especially with the new code I added for custom resolutions. Thank you very much, I am in your debt. Will upload a fix tomorrow morning, will probably just replace the new 0.341a zips (because I really need them tested), will post here when I replace them.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
Hey, just updated the 0.341a binary zips with the fix in the directshow plugin. Thanks for pointing it out. Slipped by me because my devices rarely ever use a resolution range.
 
Top