mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 17:44:04 +08:00
videoio(dshow): add NULL ptr check
This commit is contained in:
parent
5340dc6686
commit
d7cb2ea210
@ -2731,6 +2731,7 @@ int videoInput::start(int deviceID, videoDevice *VD){
|
|||||||
}
|
}
|
||||||
|
|
||||||
VIDEOINFOHEADER *pVih = reinterpret_cast<VIDEOINFOHEADER*>(VD->pAmMediaType->pbFormat);
|
VIDEOINFOHEADER *pVih = reinterpret_cast<VIDEOINFOHEADER*>(VD->pAmMediaType->pbFormat);
|
||||||
|
CV_Assert(pVih);
|
||||||
int currentWidth = HEADER(pVih)->biWidth;
|
int currentWidth = HEADER(pVih)->biWidth;
|
||||||
int currentHeight = HEADER(pVih)->biHeight;
|
int currentHeight = HEADER(pVih)->biHeight;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user