I am the original author and I shall take a look at this issue...
Unhandled exception at 0x689ea17f in iexplore.exe: 0xC0000094:
Integer division by zero
HRESULT CVCamStream::CheckMediaType(const CMediaType *pMediaType)
{
VIDEOINFOHEADER *pvi = (VIDEOINFOHEADER *)(pMediaType->Format());
if(
pvi->bmiHeader.biWidth != prev_vid_info.bmiHeader.biWidth ||
pvi->bmiHeader.biHeight != prev_vid_info.bmiHeader.biHeight
)
{
prev_vid_info = *pvi;
if(
pvi->bmiHeader.biWidth % 80 == 0
&& pvi->bmiHeader.biHeight % 60 == 0 )
{
int index = pvi->bmiHeader.biWidth / 80;
GetMediaType( index, &m_mt );
}
else
{
GetMediaType( 9, &m_mt );
}
IPin* pin;
ConnectedTo(&pin);
if(pin)
{
IFilterGraph *pGraph = m_pParent->GetGraph();
pGraph->Reconnect(this);
}
}
if(*pMediaType != m_mt)
return E_INVALIDARG;
return S_OK;
} // CheckMediaType
The point of interest is that the m_mt member variable. Throw this
member varibale to the GetMediaType function then video's property
will be changed.
thanks all masters
I'd forgot an important thing that should be wrote.
You should prepare resolutions corresponding to change in the
GetMediaType-function.