Merge pull request #21301 from alalek:coverity_fixes_4.x

This commit is contained in:
Alexander Alekhin 2021-12-21 16:39:04 +00:00
commit 2aa47554fc

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)