mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 12:32:29 +00:00
Properly ref caps and pad template in FACTORY macros
Original commit message from CVS: Properly ref caps and pad template in FACTORY macros
This commit is contained in:
parent
876398c493
commit
112c6867f3
2 changed files with 4 additions and 4 deletions
|
@ -90,7 +90,7 @@ factoryname (void) \
|
||||||
if (!caps) { \
|
if (!caps) { \
|
||||||
caps = gst_caps_chain (__VA_ARGS__, NULL); \
|
caps = gst_caps_chain (__VA_ARGS__, NULL); \
|
||||||
} \
|
} \
|
||||||
return caps; \
|
return gst_caps_ref(caps); \
|
||||||
}
|
}
|
||||||
#elif defined(G_HAVE_GNUC_VARARGS)
|
#elif defined(G_HAVE_GNUC_VARARGS)
|
||||||
#define GST_CAPS_NEW(name, type, a...) \
|
#define GST_CAPS_NEW(name, type, a...) \
|
||||||
|
@ -109,7 +109,7 @@ factoryname (void) \
|
||||||
if (!caps) { \
|
if (!caps) { \
|
||||||
caps = gst_caps_chain (a, NULL); \
|
caps = gst_caps_chain (a, NULL); \
|
||||||
} \
|
} \
|
||||||
return caps; \
|
return gst_caps_ref(caps); \
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -348,7 +348,7 @@ name (void) \
|
||||||
pres, \
|
pres, \
|
||||||
__VA_ARGS__ ); \
|
__VA_ARGS__ ); \
|
||||||
} \
|
} \
|
||||||
return templ; \
|
return (GstPadTemplate *)g_object_ref((GObject *)templ); \
|
||||||
}
|
}
|
||||||
#elif defined(G_HAVE_GNUC_VARARGS)
|
#elif defined(G_HAVE_GNUC_VARARGS)
|
||||||
/* CR1: the space after 'a' is necessary because of preprocessing in gcc */
|
/* CR1: the space after 'a' is necessary because of preprocessing in gcc */
|
||||||
|
@ -372,7 +372,7 @@ name (void) \
|
||||||
pres, \
|
pres, \
|
||||||
a ); \
|
a ); \
|
||||||
} \
|
} \
|
||||||
return templ; \
|
return (GstPadTemplate *)g_object_ref((GObject *)templ); \
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue