diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2012-03-10 10:51:44 +0100 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2012-03-10 10:52:01 +0100 |
commit | 756948262c8bc596149eda346517e289f914a8a8 (patch) | |
tree | 74a98b99fe0dc0daf83eff41645e3d1593a02bda /gst/goom2k1 | |
parent | e0e39cb4eedd59bcf75eece82f54bc54c9390666 (diff) | |
download | gstreamer-plugins-good-756948262c8bc596149eda346517e289f914a8a8.tar.gz |
fix template caps refcount
Diffstat (limited to 'gst/goom2k1')
-rw-r--r-- | gst/goom2k1/gstgoom.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gst/goom2k1/gstgoom.c b/gst/goom2k1/gstgoom.c index 96c11e5da..ae78d976d 100644 --- a/gst/goom2k1/gstgoom.c +++ b/gst/goom2k1/gstgoom.c @@ -249,7 +249,7 @@ gst_goom_src_negotiate (GstGoom * goom) { GstCaps *othercaps, *target; GstStructure *structure; - const GstCaps *templ; + GstCaps *templ; GstQuery *query; GstBufferPool *pool = NULL; guint size, min, max, prefix, alignment; @@ -262,14 +262,16 @@ gst_goom_src_negotiate (GstGoom * goom) othercaps = gst_pad_peer_query_caps (goom->srcpad, NULL); if (othercaps) { target = gst_caps_intersect (othercaps, templ); + gst_caps_unref (templ); gst_caps_unref (othercaps); if (gst_caps_is_empty (target)) goto no_format; + target = gst_caps_make_writable (target); gst_caps_truncate (target); } else { - target = gst_caps_ref ((GstCaps *) templ); + target = gst_caps_copy (templ); } structure = gst_caps_get_structure (target, 0); |