From 0f357a085273ed4ebca48cc6462599c3fc118ad6 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Thu, 5 Feb 2004 02:30:53 +0000 Subject: [PATCH] gst/gstelement.c: Make sure we have a GstRealPad before accessing its structure members. Original commit message from CVS: * gst/gstelement.c: (gst_element_clear_pad_caps): Make sure we have a GstRealPad before accessing its structure members. --- ChangeLog | 5 +++++ gst/gstelement.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 71b3fb2868..ea14e3f03c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-02-04 David Schleef + + * gst/gstelement.c: (gst_element_clear_pad_caps): Make sure we have + a GstRealPad before accessing its structure members. + 2004-02-04 Benjamin Otte * gst/gstclock.c: (gst_clock_init), (gst_clock_set_speed), diff --git a/gst/gstelement.c b/gst/gstelement.c index c2d46c6875..afbcc78082 100644 --- a/gst/gstelement.c +++ b/gst/gstelement.c @@ -2757,7 +2757,9 @@ gst_element_clear_pad_caps (GstElement *element) GstPad *pad = GST_PAD (pads->data); gst_pad_unnegotiate (pad); - gst_caps_replace (&GST_RPAD_EXPLICIT_CAPS (pad), NULL); + if (GST_IS_REAL_PAD (pad)){ + gst_caps_replace (&GST_RPAD_EXPLICIT_CAPS (pad), NULL); + } pads = g_list_next (pads); }