From d0f97d1978519eea531444e0f90c5567657364e5 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 23 Jan 2003 19:49:18 +0000 Subject: [PATCH] - Proxy the get_caps function slightly differently. This is potentially dangerous as it works quite differently. My t... Original commit message from CVS: - Proxy the get_caps function slightly differently. This is potentially dangerous as it works quite differently. My tests seem to work though and it fixes the play-multi-file-segfault in the player. --- gst/gstqueue.c | 9 ++++++--- plugins/elements/gstqueue.c | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/gst/gstqueue.c b/gst/gstqueue.c index 54cdd5c..040ecbb 100644 --- a/gst/gstqueue.c +++ b/gst/gstqueue.c @@ -194,11 +194,14 @@ gst_queue_getcaps (GstPad *pad, GstCaps *caps) GstPad *otherpad; if (pad == queue->srcpad) - otherpad = queue->sinkpad; + otherpad = GST_PAD_PEER (queue->sinkpad); else - otherpad = queue->srcpad; + otherpad = GST_PAD_PEER (queue->srcpad); + + if (otherpad) + return gst_pad_get_caps (otherpad); - return gst_pad_get_allowed_caps (otherpad); + return NULL; } static void diff --git a/plugins/elements/gstqueue.c b/plugins/elements/gstqueue.c index 54cdd5c..040ecbb 100644 --- a/plugins/elements/gstqueue.c +++ b/plugins/elements/gstqueue.c @@ -194,11 +194,14 @@ gst_queue_getcaps (GstPad *pad, GstCaps *caps) GstPad *otherpad; if (pad == queue->srcpad) - otherpad = queue->sinkpad; + otherpad = GST_PAD_PEER (queue->sinkpad); else - otherpad = queue->srcpad; + otherpad = GST_PAD_PEER (queue->srcpad); + + if (otherpad) + return gst_pad_get_caps (otherpad); - return gst_pad_get_allowed_caps (otherpad); + return NULL; } static void -- 2.7.4