From: David I. Lehn Date: Wed, 21 Feb 2001 20:27:54 +0000 (+0000) Subject: Added parameter checking to gst_queue_get(). X-Git-Tag: RELEASE-0_1_1-DUCTTAPE~30 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0edc93ae29e20ae3cd2aa79595ab1e1c75905217;p=platform%2Fupstream%2Fgstreamer.git Added parameter checking to gst_queue_get(). Original commit message from CVS: Added parameter checking to gst_queue_get(). --- diff --git a/gst/gstqueue.c b/gst/gstqueue.c index ba91043..a500f91 100644 --- a/gst/gstqueue.c +++ b/gst/gstqueue.c @@ -251,11 +251,15 @@ gst_queue_chain (GstPad *pad, GstBuffer *buf) static GstBuffer * gst_queue_get (GstPad *pad) { - GstQueue *queue = GST_QUEUE (GST_OBJECT_PARENT (pad)); + GstQueue *queue; GstBuffer *buf = NULL; GSList *front; const guchar *name; + g_return_val_if_fail (pad != NULL, NULL); + g_return_val_if_fail (GST_IS_PAD (pad), NULL); + + queue = GST_QUEUE (GST_OBJECT_PARENT (pad)); name = GST_ELEMENT_NAME (queue); /* have to lock for thread-safety */ diff --git a/plugins/elements/gstqueue.c b/plugins/elements/gstqueue.c index ba91043..a500f91 100644 --- a/plugins/elements/gstqueue.c +++ b/plugins/elements/gstqueue.c @@ -251,11 +251,15 @@ gst_queue_chain (GstPad *pad, GstBuffer *buf) static GstBuffer * gst_queue_get (GstPad *pad) { - GstQueue *queue = GST_QUEUE (GST_OBJECT_PARENT (pad)); + GstQueue *queue; GstBuffer *buf = NULL; GSList *front; const guchar *name; + g_return_val_if_fail (pad != NULL, NULL); + g_return_val_if_fail (GST_IS_PAD (pad), NULL); + + queue = GST_QUEUE (GST_OBJECT_PARENT (pad)); name = GST_ELEMENT_NAME (queue); /* have to lock for thread-safety */