diff options
Diffstat (limited to 'gst/dvbsuboverlay/gstdvbsuboverlay.c')
-rw-r--r-- | gst/dvbsuboverlay/gstdvbsuboverlay.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gst/dvbsuboverlay/gstdvbsuboverlay.c b/gst/dvbsuboverlay/gstdvbsuboverlay.c index 235f86a24..833c8dfdc 100644 --- a/gst/dvbsuboverlay/gstdvbsuboverlay.c +++ b/gst/dvbsuboverlay/gstdvbsuboverlay.c @@ -401,28 +401,29 @@ gst_dvbsub_overlay_getcaps (GstPad * pad, GstCaps * filter) { GstDVBSubOverlay *render = GST_DVBSUB_OVERLAY (gst_pad_get_parent (pad)); GstPad *otherpad; - GstCaps *caps; + GstCaps *caps, *templ; if (pad == render->srcpad) otherpad = render->video_sinkpad; else otherpad = render->srcpad; + templ = gst_pad_get_pad_template_caps (otherpad); + /* we can do what the peer can */ caps = gst_pad_peer_query_caps (otherpad, filter); if (caps) { GstCaps *temp; - const GstCaps *templ; /* filtered against our padtemplate */ - templ = gst_pad_get_pad_template_caps (otherpad); temp = gst_caps_intersect (caps, templ); + gst_caps_unref (templ); gst_caps_unref (caps); /* this is what we can do */ caps = temp; } else { /* no peer, our padtemplate is enough then */ - caps = gst_caps_copy (gst_pad_get_pad_template_caps (pad)); + caps = templ; } gst_object_unref (render); |