[gst-devel] Re: [gst-cvs] thomasvs gst-plugins: gst-plugins/ext/mad/
Bastien Nocera
hadess at hadess.net
Thu Dec 12 09:26:03 CET 2002
On Thu, 2002-12-12 at 17:08, David I. Lehn wrote:
> * Thomas Vander Stichele <thomasvs at users.sourceforge.net> [20021212 08:59]:
> > Index: gstmad.c
> ....
> > mad = GST_MAD (gst_pad_get_parent (pad));
> > + g_assert (GST_IS_MAD (mad));
Overkill, mad will be either a GstMad, or NULL.
>
> I'm not sure what our current policy is but using g_return_if_fail()
> instead of g_assert() seems to be more the current fad these days.
> Maybe it doesn't matter since it shouldn't trigger either way. ;)
g_assert will make the whole application crash/exit. You just want a
warning, not the whole application to fall over.
In this case, I'm missing a bit of context. Is gst_pad_get_parent()
always supposed to work ? Or it might sometimes, not work, under normal
circumstances ?
--
/Bastien Nocera
http://hadess.net
#2 0x4205a2cc in printf ("Oh my %s\n", preferred_deity) from
/lib/i686/libc.so.6 printf ("Oh my %s\n", preferred_deity);
Segmentation fault
More information about the gstreamer-devel
mailing list