videoio: add non zero check

This commit is contained in:
Alexander Alekhin 2021-12-21 14:32:19 +00:00
parent 0e274fc4be
commit 4dbba5ac98

View File

@ -527,6 +527,7 @@ bool GStreamerCapture::grabAudioFrame()
CV_Error(Error::StsError, "GStreamer: gst_audio_info_from_caps() is failed. Can't handle unknown layout");
}
int bpf = GST_AUDIO_INFO_BPF(&info);
CV_CheckGT(bpf, 0, "");
GstStructure* structure = gst_caps_get_structure(frame_caps, 0); // no lifetime transfer
if (!structure)