Skip to content

Commit

Permalink
rtsp-media: Sink pipeline in gst_rtsp_media_take_pipeline()
Browse files Browse the repository at this point in the history
It's taken ownership of by the media, and returned with `transfer none`
from the GstRTSPMedia::create_pipeline() vfunc. If we don't sink it
first then any bindings will wrongly take ownership of the pipeline once
it arrives in bindings code.
  • Loading branch information
sdroege committed Feb 21, 2020
1 parent c1ca88c commit a2ba363
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gst/rtsp-server/rtsp-media.c
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ gst_rtsp_media_get_element (GstRTSPMedia * media)
/**
* gst_rtsp_media_take_pipeline:
* @media: a #GstRTSPMedia
* @pipeline: (transfer full): a #GstPipeline
* @pipeline: (transfer floating): a #GstPipeline
*
* Set @pipeline as the #GstPipeline for @media. Ownership is
* taken of @pipeline.
Expand All @@ -976,7 +976,7 @@ gst_rtsp_media_take_pipeline (GstRTSPMedia * media, GstPipeline * pipeline)

g_mutex_lock (&priv->lock);
old = priv->pipeline;
priv->pipeline = GST_ELEMENT_CAST (pipeline);
priv->pipeline = gst_object_ref_sink (GST_ELEMENT_CAST (pipeline));
nettime = priv->nettime;
priv->nettime = NULL;
g_mutex_unlock (&priv->lock);
Expand Down

0 comments on commit a2ba363

Please sign in to comment.