diff --git a/gst/goom/gstgoom.c b/gst/goom/gstgoom.c index 91c21c692a..6afdd6a615 100644 --- a/gst/goom/gstgoom.c +++ b/gst/goom/gstgoom.c @@ -262,7 +262,7 @@ gst_goom_src_setcaps (GstPad * pad, GstCaps * caps) static gboolean gst_goom_src_negotiate (GstGoom * goom) { - GstCaps *othercaps, *target, *intersect; + GstCaps *othercaps, *target; GstStructure *structure; const GstCaps *templ; @@ -273,14 +273,13 @@ gst_goom_src_negotiate (GstGoom * goom) /* see what the peer can do */ othercaps = gst_pad_peer_get_caps (goom->srcpad); if (othercaps) { - intersect = gst_caps_intersect (othercaps, templ); + target = gst_caps_intersect (othercaps, templ); gst_caps_unref (othercaps); - if (gst_caps_is_empty (intersect)) + if (gst_caps_is_empty (target)) goto no_format; - target = gst_caps_copy_nth (intersect, 0); - gst_caps_unref (intersect); + gst_caps_truncate (target); } else { target = gst_caps_ref ((GstCaps *) templ); } @@ -297,7 +296,7 @@ gst_goom_src_negotiate (GstGoom * goom) no_format: { - gst_caps_unref (intersect); + gst_caps_unref (target); return FALSE; } } diff --git a/gst/goom2k1/gstgoom.c b/gst/goom2k1/gstgoom.c index 09ecc53f54..703e949a70 100644 --- a/gst/goom2k1/gstgoom.c +++ b/gst/goom2k1/gstgoom.c @@ -262,7 +262,7 @@ gst_goom_src_setcaps (GstPad * pad, GstCaps * caps) static gboolean gst_goom_src_negotiate (GstGoom * goom) { - GstCaps *othercaps, *target, *intersect; + GstCaps *othercaps, *target; GstStructure *structure; const GstCaps *templ; @@ -273,14 +273,13 @@ gst_goom_src_negotiate (GstGoom * goom) /* see what the peer can do */ othercaps = gst_pad_peer_get_caps (goom->srcpad); if (othercaps) { - intersect = gst_caps_intersect (othercaps, templ); + target = gst_caps_intersect (othercaps, templ); gst_caps_unref (othercaps); - if (gst_caps_is_empty (intersect)) + if (gst_caps_is_empty (target)) goto no_format; - target = gst_caps_copy_nth (intersect, 0); - gst_caps_unref (intersect); + gst_caps_truncate (target); } else { target = gst_caps_ref ((GstCaps *) templ); } @@ -297,7 +296,7 @@ gst_goom_src_negotiate (GstGoom * goom) no_format: { - gst_caps_unref (intersect); + gst_caps_unref (target); return FALSE; } } diff --git a/gst/monoscope/gstmonoscope.c b/gst/monoscope/gstmonoscope.c index f29eb01617..f45b923cd5 100644 --- a/gst/monoscope/gstmonoscope.c +++ b/gst/monoscope/gstmonoscope.c @@ -239,7 +239,7 @@ gst_monoscope_src_setcaps (GstPad * pad, GstCaps * caps) static gboolean gst_monoscope_src_negotiate (GstMonoscope * monoscope) { - GstCaps *othercaps, *target, *intersect; + GstCaps *othercaps, *target; GstStructure *structure; const GstCaps *templ; @@ -250,14 +250,13 @@ gst_monoscope_src_negotiate (GstMonoscope * monoscope) /* see what the peer can do */ othercaps = gst_pad_peer_get_caps (monoscope->srcpad); if (othercaps) { - intersect = gst_caps_intersect (othercaps, templ); + target = gst_caps_intersect (othercaps, templ); gst_caps_unref (othercaps); - if (gst_caps_is_empty (intersect)) + if (gst_caps_is_empty (target)) goto no_format; - target = gst_caps_copy_nth (intersect, 0); - gst_caps_unref (intersect); + gst_caps_truncate (target); } else { target = gst_caps_ref ((GstCaps *) templ); } @@ -274,7 +273,7 @@ gst_monoscope_src_negotiate (GstMonoscope * monoscope) no_format: { - gst_caps_unref (intersect); + gst_caps_unref (target); return FALSE; } }