From: Wim T. <wt...@us...> - 2002-08-02 11:30:12
|
CVS Root: /cvsroot/gstreamer Module: gst-plugins Changes by: wtay Date: Fri Aug 02 2002 04:30:11 PDT Log message: Don't send event on unusable pads. Modified files: ext/mad : gstmad.c Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/ext/mad/gstmad.c.diff?r1=1.33&r2=1.34 ====Begin Diffs==== Index: gstmad.c =================================================================== RCS file: /cvsroot/gstreamer/gst-plugins/ext/mad/gstmad.c,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- gstmad.c 24 Jul 2002 21:36:39 -0000 1.33 +++ gstmad.c 2 Aug 2002 11:29:59 -0000 1.34 @@ -294,7 +294,6 @@ 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_FORMAT_TIME, 0 }; - + return (GST_PAD_IS_SRC (pad) ? src_formats : sink_formats); } @@ -793,6 +792,9 @@ { gint n = GST_EVENT_DISCONT_OFFSET_LEN (event); gint i; + + if (!GST_PAD_IS_USABLE (mad->srcpad)) + return; for (i=0; i<n; i++) { if (gst_pad_handles_format (pad, GST_EVENT_DISCONT_OFFSET(event,i).format)) |