Original commit message from CVS:
Properly ref caps and pad template in FACTORY macros
if (!caps) { \
caps = gst_caps_chain (__VA_ARGS__, NULL); \
} \
- return caps; \
+ return gst_caps_ref(caps); \
}
#elif defined(G_HAVE_GNUC_VARARGS)
#define GST_CAPS_NEW(name, type, a...) \
if (!caps) { \
caps = gst_caps_chain (a, NULL); \
} \
- return caps; \
+ return gst_caps_ref(caps); \
}
#endif
pres, \
__VA_ARGS__ ); \
} \
- return templ; \
+ return (GstPadTemplate *)g_object_ref((GObject *)templ); \
}
#elif defined(G_HAVE_GNUC_VARARGS)
/* CR1: the space after 'a' is necessary because of preprocessing in gcc */
pres, \
a ); \
} \
- return templ; \
+ return (GstPadTemplate *)g_object_ref((GObject *)templ); \
}
#endif