summaryrefslogtreecommitdiff
path: root/gst/dvbsuboverlay/gstdvbsuboverlay.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst/dvbsuboverlay/gstdvbsuboverlay.c')
-rw-r--r--gst/dvbsuboverlay/gstdvbsuboverlay.c41
1 files changed, 14 insertions, 27 deletions
diff --git a/gst/dvbsuboverlay/gstdvbsuboverlay.c b/gst/dvbsuboverlay/gstdvbsuboverlay.c
index de6508478..2f3626960 100644
--- a/gst/dvbsuboverlay/gstdvbsuboverlay.c
+++ b/gst/dvbsuboverlay/gstdvbsuboverlay.c
@@ -550,12 +550,6 @@ gst_dvbsub_overlay_get_videosink_caps (GstDVBSubOverlay * render, GstPad * pad,
/* if peer returns ANY caps, return filtered src pad template caps */
caps = gst_pad_get_pad_template_caps (srcpad);
- if (filter) {
- GstCaps *intersection = gst_caps_intersect_full (filter, caps,
- GST_CAPS_INTERSECT_FIRST);
- gst_caps_unref (caps);
- caps = intersection;
- }
} else {
@@ -572,14 +566,15 @@ gst_dvbsub_overlay_get_videosink_caps (GstDVBSubOverlay * render, GstPad * pad,
} else {
/* no peer, our padtemplate is enough then */
caps = gst_pad_get_pad_template_caps (pad);
- if (filter) {
- GstCaps *intersection;
+ }
- intersection =
- gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST);
- gst_caps_unref (caps);
- caps = intersection;
- }
+ if (filter) {
+ GstCaps *intersection;
+
+ intersection =
+ gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST);
+ gst_caps_unref (caps);
+ caps = intersection;
}
GST_DEBUG_OBJECT (render, "returning %" GST_PTR_FORMAT, caps);
@@ -618,13 +613,6 @@ gst_dvbsub_overlay_get_src_caps (GstDVBSubOverlay * render, GstPad * pad,
/* if peer returns ANY caps, return filtered sink pad template caps */
caps = gst_pad_get_pad_template_caps (sinkpad);
- if (filter) {
- GstCaps *intersection = gst_caps_intersect_full (filter, caps,
- GST_CAPS_INTERSECT_FIRST);
- gst_caps_unref (caps);
- caps = intersection;
- }
-
} else {
/* return upstream caps + composition feature + upstream caps
@@ -640,14 +628,13 @@ gst_dvbsub_overlay_get_src_caps (GstDVBSubOverlay * render, GstPad * pad,
} else {
/* no peer, our padtemplate is enough then */
caps = gst_pad_get_pad_template_caps (pad);
- if (filter) {
- GstCaps *intersection;
+ }
- intersection =
- gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST);
- gst_caps_unref (caps);
- caps = intersection;
- }
+ if (filter) {
+ GstCaps *intersection = gst_caps_intersect_full (filter, caps,
+ GST_CAPS_INTERSECT_FIRST);
+ gst_caps_unref (caps);
+ caps = intersection;
}
GST_DEBUG_OBJECT (render, "returning %" GST_PTR_FORMAT, caps);