gst/gstpad.c: Fix small refount leak in caps compatibility check.

Original commit message from CVS:
Patch by: Antoine Tremblay <hexa00 at gmail dot com>
* gst/gstpad.c: (gst_pad_link_check_compatible_unlocked):
Original patch by : Simon Descaries
Fix small refount leak in caps compatibility check.
Fixes #551676.
This commit is contained in:
Antoine Tremblay 2008-10-06 08:45:42 +00:00 committed by Wim Taymans
parent a76176f9e9
commit db71547857
3 changed files with 16 additions and 2 deletions

View file

@ -1,3 +1,12 @@
2008-10-06 Wim Taymans <wim.taymans@collabora.co.uk>
Patch by: Antoine Tremblay <hexa00 at gmail dot com>
* gst/gstpad.c: (gst_pad_link_check_compatible_unlocked):
Original patch by : Simon Descaries
Fix small refount leak in caps compatibility check.
Fixes #551676.
2008-10-06 Stefan Kost <ensonic@users.sf.net>
* docs/pwg/advanced-request.xml:

2
common

@ -1 +1 @@
Subproject commit 1ff63d8f92c36bf207434436f4ce75f2a4ea11a4
Subproject commit ea93f2ed580bcc19322e4c07f677eda980c821eb

View file

@ -1679,8 +1679,13 @@ gst_pad_link_check_compatible_unlocked (GstPad * src, GstPad * sink)
/* if we have caps on both pads we can check the intersection. If one
* of the caps is NULL, we return TRUE. */
if (srccaps == NULL || sinkcaps == NULL)
if (srccaps == NULL || sinkcaps == NULL) {
if (srccaps)
gst_caps_unref (srccaps);
if (sinkcaps)
gst_caps_unref (sinkcaps);
goto done;
}
icaps = gst_caps_intersect (srccaps, sinkcaps);
gst_caps_unref (srccaps);