qcap: Make sure input to AMStreamConfig_SetFormat is not NULL.
This commit is contained in:
parent
24e426517e
commit
62823d272d
|
@ -400,7 +400,7 @@ AMStreamConfig_SetFormat(IAMStreamConfig *iface, AM_MEDIA_TYPE *pmt)
|
|||
ICOM_THIS_MULTI(VfwCapture, IAMStreamConfig_vtbl, iface);
|
||||
IPinImpl *pin;
|
||||
|
||||
TRACE("(%p): %p->%p\n", iface, pmt, pmt->pbFormat);
|
||||
TRACE("(%p): %p->%p\n", iface, pmt, pmt ? pmt->pbFormat : NULL);
|
||||
|
||||
if (This->state != State_Stopped)
|
||||
{
|
||||
|
@ -408,6 +408,12 @@ AMStreamConfig_SetFormat(IAMStreamConfig *iface, AM_MEDIA_TYPE *pmt)
|
|||
return VFW_E_NOT_STOPPED;
|
||||
}
|
||||
|
||||
if (!pmt)
|
||||
{
|
||||
TRACE("pmt is NULL\n");
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
dump_AM_MEDIA_TYPE(pmt);
|
||||
|
||||
pin = (IPinImpl *)This->pOutputPin;
|
||||
|
|
Loading…
Reference in New Issue