mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-09 08:55:33 +00:00
add warning if getcaps function returns an unreferenced caps
Original commit message from CVS: add warning if getcaps function returns an unreferenced caps
This commit is contained in:
parent
803229d42f
commit
88282d4f05
1 changed files with 6 additions and 1 deletions
|
@ -1833,8 +1833,13 @@ gst_pad_get_caps (GstPad *pad)
|
|||
return GST_PAD_CAPS (realpad);
|
||||
}
|
||||
else if GST_RPAD_GETCAPSFUNC (realpad) {
|
||||
GstCaps *caps;
|
||||
|
||||
GST_CAT_DEBUG (GST_CAT_CAPS, "using pad get function");
|
||||
return GST_RPAD_GETCAPSFUNC (realpad) (GST_PAD_CAST (realpad), NULL);
|
||||
caps = GST_RPAD_GETCAPSFUNC (realpad) (GST_PAD_CAST (realpad), NULL);
|
||||
if(caps)g_return_val_if_fail(caps->refcount > 0, NULL);
|
||||
|
||||
return caps;
|
||||
}
|
||||
else if (GST_PAD_PAD_TEMPLATE (realpad)) {
|
||||
GstPadTemplate *templ = GST_PAD_PAD_TEMPLATE (realpad);
|
||||
|
|
Loading…
Reference in a new issue