mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-05 15:30:00 +01:00
BugFix Stream discoverer don't need to unref caps
This commit is contained in:
@@ -121,21 +121,18 @@ GstFlowReturn callback_stream_discoverer (GstAppSink *sink, gpointer p)
|
||||
StreamInfo *info = static_cast<StreamInfo *>(p);
|
||||
// get caps of the sample
|
||||
GstVideoInfo v_frame_video_info_;
|
||||
GstCaps *caps = gst_sample_get_caps(sample);
|
||||
if (gst_video_info_from_caps (&v_frame_video_info_, caps)) {
|
||||
if (gst_video_info_from_caps (&v_frame_video_info_, gst_sample_get_caps(sample))) {
|
||||
// fill the info
|
||||
info->width = v_frame_video_info_.width;
|
||||
info->height = v_frame_video_info_.height;
|
||||
// release info to let StreamDiscoverer go forward
|
||||
info->discovered.notify_all();
|
||||
}
|
||||
gst_caps_unref(caps);
|
||||
gst_sample_unref (sample);
|
||||
}
|
||||
else
|
||||
ret = GST_FLOW_FLUSHING;
|
||||
|
||||
gst_sample_unref (sample);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user