Fix gst_initializer
Use the return value of gst_init_check instead of testing the error pointer
This commit is contained in:
parent
327b98eb13
commit
de5b6386e0
@ -216,10 +216,10 @@ private:
|
||||
call_deinit = utils::getConfigurationParameterBool("OPENCV_VIDEOIO_GSTREAMER_CALL_DEINIT", false);
|
||||
|
||||
GSafePtr<GError> err;
|
||||
gst_init_check(NULL, NULL, err.getRef());
|
||||
if (err)
|
||||
gboolean gst_init_res = gst_init_check(NULL, NULL, err.getRef());
|
||||
if (!gst_init_res)
|
||||
{
|
||||
CV_WARN("Can't initialize GStreamer: " << err->message);
|
||||
CV_WARN("Can't initialize GStreamer: " << (err ? err->message : "<unknown reason>"));
|
||||
isFailed = true;
|
||||
return;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user