mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
rtspreal: fix minor memory leak
Caps take their own reference when a buffer is added to them, so unref buffer after adding it to caps (#608533).
This commit is contained in:
parent
29c509a7b8
commit
4cb5f32308
1 changed files with 2 additions and 0 deletions
|
@ -593,7 +593,9 @@ rtsp_ext_real_parse_sdp (GstRTSPExtension * ext, GstSDPMessage * sdp,
|
||||||
GST_BUFFER_SIZE (buf) = offset;
|
GST_BUFFER_SIZE (buf) = offset;
|
||||||
|
|
||||||
/* Set on caps */
|
/* Set on caps */
|
||||||
|
GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_IN_CAPS);
|
||||||
gst_structure_set (props, "config", GST_TYPE_BUFFER, buf, NULL);
|
gst_structure_set (props, "config", GST_TYPE_BUFFER, buf, NULL);
|
||||||
|
gst_buffer_unref (buf);
|
||||||
|
|
||||||
/* Overwrite encoding and media fields */
|
/* Overwrite encoding and media fields */
|
||||||
gst_structure_set (props, "encoding-name", G_TYPE_STRING, "X-REAL-RDT", NULL);
|
gst_structure_set (props, "encoding-name", G_TYPE_STRING, "X-REAL-RDT", NULL);
|
||||||
|
|
Loading…
Reference in a new issue