mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
pulsesink: fixup last commit
We need to prevent the eventual leak better.
This commit is contained in:
parent
f6892b81ae
commit
9fd0adc7dc
1 changed files with 2 additions and 1 deletions
|
@ -459,6 +459,8 @@ gst_pulseringbuffer_open_device (GstRingBuffer * buf)
|
|||
|
||||
pctx = g_hash_table_lookup (gst_pulse_shared_contexts, pbuf->context_name);
|
||||
if (pctx == NULL) {
|
||||
pctx = g_slice_new0 (GstPulseContext);
|
||||
|
||||
/* get the mainloop api and create a context */
|
||||
GST_LOG_OBJECT (psink, "new context with name %s",
|
||||
GST_STR_NULL (pbuf->context_name));
|
||||
|
@ -466,7 +468,6 @@ gst_pulseringbuffer_open_device (GstRingBuffer * buf)
|
|||
if (!(pctx->context = pa_context_new (api, pbuf->context_name)))
|
||||
goto create_failed;
|
||||
|
||||
pctx = g_slice_new0 (GstPulseContext);
|
||||
pctx->ring_buffers = g_slist_prepend (pctx->ring_buffers, pbuf);
|
||||
g_hash_table_insert (gst_pulse_shared_contexts, pbuf->context_name,
|
||||
(gpointer) pctx);
|
||||
|
|
Loading…
Reference in a new issue