mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 06:58:56 +00:00
added sanity checks to make sure _push and _pull don't get called on pads of the wrong direction
Original commit message from CVS: added sanity checks to make sure _push and _pull don't get called on pads of the wrong direction
This commit is contained in:
parent
6aacb9ca09
commit
dfa833096c
1 changed files with 4 additions and 1 deletions
|
@ -1455,7 +1455,8 @@ gst_pad_push (GstPad *pad, GstBuffer *buf)
|
||||||
|
|
||||||
GST_DEBUG_ENTER ("(%s:%s)", GST_DEBUG_PAD_NAME (pad));
|
GST_DEBUG_ENTER ("(%s:%s)", GST_DEBUG_PAD_NAME (pad));
|
||||||
|
|
||||||
g_return_if_fail (peer != NULL);
|
g_return_if_fail (GST_PAD_DIRECTION (pad) != GST_PAD_SRC);
|
||||||
|
g_return_if_fail (peer != NULL);
|
||||||
|
|
||||||
if (peer->pushfunc) {
|
if (peer->pushfunc) {
|
||||||
GST_DEBUG (GST_CAT_DATAFLOW, "calling pushfunc &%s of peer pad %s:%s\n",
|
GST_DEBUG (GST_CAT_DATAFLOW, "calling pushfunc &%s of peer pad %s:%s\n",
|
||||||
|
@ -1482,6 +1483,7 @@ gst_pad_pull (GstPad *pad)
|
||||||
|
|
||||||
GST_DEBUG_ENTER("(%s:%s)",GST_DEBUG_PAD_NAME(pad));
|
GST_DEBUG_ENTER("(%s:%s)",GST_DEBUG_PAD_NAME(pad));
|
||||||
|
|
||||||
|
g_return_val_if_fail (GST_PAD_DIRECTION (pad) != GST_PAD_SINK, NULL);
|
||||||
g_return_val_if_fail (peer != NULL, NULL);
|
g_return_val_if_fail (peer != NULL, NULL);
|
||||||
|
|
||||||
if (peer->pullfunc) {
|
if (peer->pullfunc) {
|
||||||
|
@ -1515,6 +1517,7 @@ gst_pad_pullregion (GstPad *pad, GstRegionType type, guint64 offset, guint64 len
|
||||||
{
|
{
|
||||||
GstRealPad *peer = GST_RPAD_PEER(pad);
|
GstRealPad *peer = GST_RPAD_PEER(pad);
|
||||||
|
|
||||||
|
g_return_val_if_fail (GST_PAD_DIRECTION (pad) != GST_PAD_SINK, NULL);
|
||||||
g_return_val_if_fail (peer != NULL, NULL);
|
g_return_val_if_fail (peer != NULL, NULL);
|
||||||
|
|
||||||
GST_DEBUG_ENTER("(%s:%s,%d,%lld,%lld)",GST_DEBUG_PAD_NAME(pad),type,offset,len);
|
GST_DEBUG_ENTER("(%s:%s,%d,%lld,%lld)",GST_DEBUG_PAD_NAME(pad),type,offset,len);
|
||||||
|
|
Loading…
Reference in a new issue