mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-24 16:18:16 +00:00
dvbsuboverlay: Avoid leaking copy of caps object
gst_pad_get_pad_template_caps() returns a reference which is unreferenced, so creating a copy using gst_caps_copy() results in a reference leak. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734528
This commit is contained in:
parent
ee09d332bd
commit
128cbf4f57
1 changed files with 2 additions and 2 deletions
|
@ -549,7 +549,7 @@ gst_dvbsub_overlay_get_videosink_caps (GstDVBSubOverlay * render, GstPad * pad,
|
|||
if (gst_caps_is_any (peer_caps)) {
|
||||
|
||||
/* if peer returns ANY caps, return filtered src pad template caps */
|
||||
caps = gst_caps_copy (gst_pad_get_pad_template_caps (srcpad));
|
||||
caps = gst_pad_get_pad_template_caps (srcpad);
|
||||
if (filter) {
|
||||
GstCaps *intersection = gst_caps_intersect_full (filter, caps,
|
||||
GST_CAPS_INTERSECT_FIRST);
|
||||
|
@ -617,7 +617,7 @@ gst_dvbsub_overlay_get_src_caps (GstDVBSubOverlay * render, GstPad * pad,
|
|||
if (gst_caps_is_any (peer_caps)) {
|
||||
|
||||
/* if peer returns ANY caps, return filtered sink pad template caps */
|
||||
caps = gst_caps_copy (gst_pad_get_pad_template_caps (sinkpad));
|
||||
caps = gst_pad_get_pad_template_caps (sinkpad);
|
||||
if (filter) {
|
||||
GstCaps *intersection = gst_caps_intersect_full (filter, caps,
|
||||
GST_CAPS_INTERSECT_FIRST);
|
||||
|
|
Loading…
Reference in a new issue