summaryrefslogtreecommitdiffstats
path: root/gst/wavparse/gstwavparse.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst/wavparse/gstwavparse.c')
-rw-r--r--gst/wavparse/gstwavparse.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gst/wavparse/gstwavparse.c b/gst/wavparse/gstwavparse.c
index 0e90130c..5d185aa5 100644
--- a/gst/wavparse/gstwavparse.c
+++ b/gst/wavparse/gstwavparse.c
@@ -215,15 +215,16 @@ gst_wavparse_init (GstWavParse * wavparse)
static void
gst_wavparse_destroy_sourcepad (GstWavParse * wavparse)
{
- gst_element_remove_pad (GST_ELEMENT (wavparse), wavparse->srcpad);
- wavparse->srcpad = NULL;
+ if (wavparse->srcpad) {
+ gst_element_remove_pad (GST_ELEMENT (wavparse), wavparse->srcpad);
+ wavparse->srcpad = NULL;
+ }
}
static void
gst_wavparse_create_sourcepad (GstWavParse * wavparse)
{
- if (wavparse->srcpad)
- gst_wavparse_destroy_sourcepad (wavparse);
+ gst_wavparse_destroy_sourcepad (wavparse);
/* source */
wavparse->srcpad =