mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 05:16:13 +00:00
imagecapturebin: Don't leak pad and sink
This commit is contained in:
parent
9605ff9aa8
commit
b297490b2a
1 changed files with 2 additions and 1 deletions
|
@ -192,7 +192,7 @@ gst_image_capture_bin_create_elements (GstImageCaptureBin * icbin)
|
||||||
if (!sink)
|
if (!sink)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
icbin->sink = gst_object_ref (sink);
|
icbin->sink = sink;
|
||||||
g_object_set (sink, "location", icbin->location, "async", FALSE, NULL);
|
g_object_set (sink, "location", icbin->location, "async", FALSE, NULL);
|
||||||
|
|
||||||
/* add and link */
|
/* add and link */
|
||||||
|
@ -204,6 +204,7 @@ gst_image_capture_bin_create_elements (GstImageCaptureBin * icbin)
|
||||||
pad = gst_element_get_static_pad (csp, "sink");
|
pad = gst_element_get_static_pad (csp, "sink");
|
||||||
if (!gst_ghost_pad_set_target (GST_GHOST_PAD (icbin->ghostpad), pad))
|
if (!gst_ghost_pad_set_target (GST_GHOST_PAD (icbin->ghostpad), pad))
|
||||||
goto error;
|
goto error;
|
||||||
|
gst_object_unref (pad);
|
||||||
|
|
||||||
icbin->elements_created = TRUE;
|
icbin->elements_created = TRUE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
Loading…
Reference in a new issue