mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
add check for setting pad_get and pad_chain functions on wrong type pads.
Original commit message from CVS: add check for setting pad_get and pad_chain functions on wrong type pads.
This commit is contained in:
parent
3f763b167c
commit
b3e15a8f71
1 changed files with 3 additions and 0 deletions
|
@ -471,6 +471,7 @@ gst_pad_set_chain_function (GstPad *pad, GstPadChainFunction chain)
|
|||
{
|
||||
g_return_if_fail (pad != NULL);
|
||||
g_return_if_fail (GST_IS_REAL_PAD (pad));
|
||||
g_return_if_fail (GST_RPAD_DIRECTION (pad) == GST_PAD_SINK);
|
||||
|
||||
GST_RPAD_CHAINFUNC (pad) = chain;
|
||||
GST_CAT_DEBUG (GST_CAT_PADS, "chainfunc for %s:%s set to %s",
|
||||
|
@ -490,6 +491,7 @@ gst_pad_set_get_function (GstPad *pad,
|
|||
{
|
||||
g_return_if_fail (pad != NULL);
|
||||
g_return_if_fail (GST_IS_REAL_PAD (pad));
|
||||
g_return_if_fail (GST_RPAD_DIRECTION (pad) == GST_PAD_SRC);
|
||||
|
||||
GST_RPAD_GETFUNC (pad) = get;
|
||||
|
||||
|
@ -509,6 +511,7 @@ gst_pad_set_event_function (GstPad *pad,
|
|||
GstPadEventFunction event)
|
||||
{
|
||||
g_return_if_fail (GST_IS_REAL_PAD (pad));
|
||||
g_return_if_fail (GST_RPAD_DIRECTION (pad) == GST_PAD_SRC);
|
||||
|
||||
GST_RPAD_EVENTFUNC (pad) = event;
|
||||
|
||||
|
|
Loading…
Reference in a new issue