From 916d083e9979df22327c4ae387444e24aefc052b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 25 Jan 2006 22:05:28 +0000 Subject: [PATCH] gst/id3demux/gstid3demux.c: Don't put function calls in g_return_if_fail() statements, or they'll be replaced with NO... Original commit message from CVS: * gst/id3demux/gstid3demux.c: (gst_id3demux_remove_srcpad): Don't put function calls in g_return_if_fail() statements, or they'll be replaced with NOOPs if someone compiles with G_DISABLE_CHECKS defined. --- ChangeLog | 7 +++++++ gst/id3demux/gstid3demux.c | 8 +++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7c7bd7a..db4b699 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-01-25 Tim-Philipp Müller + + * gst/id3demux/gstid3demux.c: (gst_id3demux_remove_srcpad): + Don't put function calls in g_return_if_fail() statements, + or they'll be replaced with NOOPs if someone compiles with + G_DISABLE_CHECKS defined. + 2006-01-25 Jan Schmidt * gst/id3demux/id3v2frames.c: (id3demux_id3v2_parse_frame): diff --git a/gst/id3demux/gstid3demux.c b/gst/id3demux/gstid3demux.c index 4f24b22..10dfcf2 100644 --- a/gst/id3demux/gstid3demux.c +++ b/gst/id3demux/gstid3demux.c @@ -291,15 +291,17 @@ gst_id3demux_add_srcpad (GstID3Demux * id3demux, GstCaps * new_caps) static gboolean gst_id3demux_remove_srcpad (GstID3Demux * id3demux) { + gboolean res = TRUE; + if (id3demux->srcpad != NULL) { GST_DEBUG_OBJECT (id3demux, "Removing src pad"); - g_return_val_if_fail (gst_element_remove_pad (GST_ELEMENT (id3demux), - id3demux->srcpad), FALSE); + res = gst_element_remove_pad (GST_ELEMENT (id3demux), id3demux->srcpad); + g_return_val_if_fail (res != FALSE, FALSE); gst_object_unref (id3demux->srcpad); id3demux->srcpad = NULL; } - return TRUE; + return res; }; static gboolean -- 2.7.4