From 5ac10a93034e7825d43b26e7e568b49493a67f19 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 2 Aug 2002 11:29:59 +0000 Subject: [PATCH] Don't send event on unusable pads. Original commit message from CVS: Don't send event on unusable pads. --- ext/mad/gstmad.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ext/mad/gstmad.c b/ext/mad/gstmad.c index dd1845306e..ada0f79e5f 100644 --- a/ext/mad/gstmad.c +++ b/ext/mad/gstmad.c @@ -294,7 +294,6 @@ gst_mad_class_init (GstMadClass *klass) g_object_class_install_property (gobject_class, ARG_CHANNELS, g_param_spec_enum ("channels", "Channels", "number of channels", GST_TYPE_MAD_CHANNELS, 0, G_PARAM_READABLE)); - } static void @@ -359,7 +358,7 @@ gst_mad_get_formats (GstPad *pad) GST_FORMAT_TIME, 0 }; - + return (GST_PAD_IS_SRC (pad) ? src_formats : sink_formats); } @@ -794,6 +793,9 @@ gst_mad_chain (GstPad *pad, GstBuffer *buffer) gint n = GST_EVENT_DISCONT_OFFSET_LEN (event); gint i; + if (!GST_PAD_IS_USABLE (mad->srcpad)) + return; + for (i=0; i