From ff01df1093de87270f934048877616f36f052d5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 18 Mar 2015 17:35:12 +0100 Subject: [PATCH] dtlsenc: Don't manually activate/deactivate srcpad --- ext/dtls/gstdtlsenc.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/ext/dtls/gstdtlsenc.c b/ext/dtls/gstdtlsenc.c index 890217d471..68949d5f58 100644 --- a/ext/dtls/gstdtlsenc.c +++ b/ext/dtls/gstdtlsenc.c @@ -296,15 +296,8 @@ gst_dtls_enc_change_state (GstElement * element, GstStateChange transition) return GST_STATE_CHANGE_FAILURE; } break; - case GST_STATE_CHANGE_READY_TO_PAUSED: - GST_DEBUG_OBJECT (self, "starting connection %s", self->connection_id); - gst_dtls_connection_start (self->connection, self->is_client); - - gst_pad_set_active (self->src, TRUE); - break; case GST_STATE_CHANGE_PAUSED_TO_READY: GST_DEBUG_OBJECT (self, "stopping connection %s", self->connection_id); - gst_pad_set_active (self->src, FALSE); gst_dtls_connection_stop (self->connection); break; @@ -324,6 +317,15 @@ gst_dtls_enc_change_state (GstElement * element, GstStateChange transition) ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); + switch (transition) { + case GST_STATE_CHANGE_READY_TO_PAUSED: + GST_DEBUG_OBJECT (self, "starting connection %s", self->connection_id); + gst_dtls_connection_start (self->connection, self->is_client); + break; + default: + break; + } + return ret; }