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:
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;