mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
event: don't ref the caps
Use a different way of getting the caps from the caps event so that no refcounting happens.
This commit is contained in:
parent
d43cdfbf37
commit
73f3b3fb75
1 changed files with 7 additions and 2 deletions
|
@ -514,11 +514,16 @@ gst_event_new_caps (GstCaps * caps)
|
|||
void
|
||||
gst_event_parse_caps (GstEvent * event, GstCaps ** caps)
|
||||
{
|
||||
GstStructure *structure;
|
||||
|
||||
g_return_if_fail (GST_IS_EVENT (event));
|
||||
g_return_if_fail (GST_EVENT_TYPE (event) == GST_EVENT_CAPS);
|
||||
|
||||
gst_structure_id_get (event->structure,
|
||||
GST_QUARK (CAPS), GST_TYPE_CAPS, caps, NULL);
|
||||
structure = event->structure;
|
||||
if (G_LIKELY (caps))
|
||||
*caps =
|
||||
g_value_get_boxed (gst_structure_id_get_value (structure,
|
||||
GST_QUARK (CAPS)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue