Commit 3b9138c4 authored by Nils Hasler's avatar Nils Hasler

fixed jump over initialisation bug.

parent c9894f96
...@@ -381,13 +381,16 @@ bool CvCapture_GStreamer::open( int type, const char* filename ) ...@@ -381,13 +381,16 @@ bool CvCapture_GStreamer::open( int type, const char* filename )
gst_app_sink_set_max_buffers (GST_APP_SINK(sink), 1); gst_app_sink_set_max_buffers (GST_APP_SINK(sink), 1);
gst_app_sink_set_drop (GST_APP_SINK(sink), stream); gst_app_sink_set_drop (GST_APP_SINK(sink), stream);
GstCaps* caps= gst_caps_new_simple("video/x-raw-rgb", {
"red_mask", G_TYPE_INT, 0x0000FF, GstCaps* caps;
"green_mask", G_TYPE_INT, 0x00FF00, caps = gst_caps_new_simple("video/x-raw-rgb",
"blue_mask", G_TYPE_INT, 0xFF0000, "red_mask", G_TYPE_INT, 0x0000FF,
NULL); "green_mask", G_TYPE_INT, 0x00FF00,
"blue_mask", G_TYPE_INT, 0xFF0000,
NULL);
gst_app_sink_set_caps(GST_APP_SINK(sink), caps); gst_app_sink_set_caps(GST_APP_SINK(sink), caps);
gst_caps_unref(caps); gst_caps_unref(caps);
}
if(gst_element_set_state(GST_ELEMENT(pipeline), GST_STATE_READY) == if(gst_element_set_state(GST_ELEMENT(pipeline), GST_STATE_READY) ==
GST_STATE_CHANGE_FAILURE) { GST_STATE_CHANGE_FAILURE) {
......
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