mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-gtk
synced 2026-01-07 20:30:36 +00:00
gstreamer: Avoid dangling pointers in free_pipeline
Although currently after free_pipeline we free the entire structure the name and the function suggests that we only free the pipeline. Also this is fixing a future possible problem with the series from Vivek Kasireddy reusing the SpiceGstDecoder for another pipeline if H/W encoder pipeline creation fails. Signed-off-by: Frediano Ziglio <freddy77@gmail.com> Acked-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
This commit is contained in:
parent
fa9922f39a
commit
e2bcf5727b
@ -353,11 +353,14 @@ static void free_pipeline(SpiceGstDecoder *decoder)
|
||||
|
||||
gst_element_set_state(decoder->pipeline, GST_STATE_NULL);
|
||||
gst_object_unref(decoder->appsrc);
|
||||
decoder->appsrc = NULL;
|
||||
if (decoder->appsink) {
|
||||
gst_object_unref(decoder->appsink);
|
||||
decoder->appsink = NULL;
|
||||
}
|
||||
gst_object_unref(decoder->pipeline);
|
||||
gst_object_unref(decoder->clock);
|
||||
decoder->clock = NULL;
|
||||
gst_object_unref(decoder->pipeline);
|
||||
decoder->pipeline = NULL;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user