mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
track: Set restriction caps when update_restriction before caps being set
And stop leaking intermediary restriction caps. https://bugzilla.gnome.org/show_bug.cgi?id=796802
This commit is contained in:
parent
a3c1734316
commit
ab22f339e6
1 changed files with 10 additions and 1 deletions
|
@ -850,8 +850,16 @@ void
|
|||
ges_track_update_restriction_caps (GESTrack * self, const GstCaps * caps)
|
||||
{
|
||||
guint i;
|
||||
GstCaps *new_restriction_caps = gst_caps_copy (self->priv->restriction_caps);
|
||||
GstCaps *new_restriction_caps;
|
||||
|
||||
g_return_if_fail (GES_IS_TRACK (self));
|
||||
|
||||
if (!self->priv->restriction_caps) {
|
||||
ges_track_set_restriction_caps (self, caps);
|
||||
return;
|
||||
}
|
||||
|
||||
new_restriction_caps = gst_caps_copy (self->priv->restriction_caps);
|
||||
for (i = 0; i < gst_caps_get_size (caps); i++) {
|
||||
GstStructure *new = gst_caps_get_structure (caps, i);
|
||||
|
||||
|
@ -865,6 +873,7 @@ ges_track_update_restriction_caps (GESTrack * self, const GstCaps * caps)
|
|||
}
|
||||
|
||||
ges_track_set_restriction_caps (self, new_restriction_caps);
|
||||
gst_caps_unref (new_restriction_caps);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue