Commit 9b173d31 authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #11573 from mshabunin:fix-gst-leak

parents 8307e06c 1a151365
...@@ -125,7 +125,7 @@ private: ...@@ -125,7 +125,7 @@ private:
gst_init(NULL, NULL); gst_init(NULL, NULL);
guint major, minor, micro, nano; guint major, minor, micro, nano;
gst_version(&major, &minor, &micro, &nano); gst_version(&major, &minor, &micro, &nano);
if (GST_VERSION_MAJOR == major) if (GST_VERSION_MAJOR != major)
{ {
CV_WARN("incompatible gstreamer version"); CV_WARN("incompatible gstreamer version");
} }
...@@ -268,7 +268,6 @@ bool GStreamerCapture::grabFrame() ...@@ -268,7 +268,6 @@ bool GStreamerCapture::grabFrame()
sample = gst_app_sink_pull_sample(GST_APP_SINK(sink)); sample = gst_app_sink_pull_sample(GST_APP_SINK(sink));
if(!sample) if(!sample)
return false; return false;
gst_sample_ref(sample);
#endif #endif
if (isPosFramesEmulated) if (isPosFramesEmulated)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment