srtpenc: fix over unlocking

Called should call function with lock, and is
also responsible for unlocking it later.

https://bugzilla.gnome.org/show_bug.cgi?id=749304
This commit is contained in:
Miguel París Díaz 2015-05-13 13:14:14 +02:00 committed by Tim-Philipp Müller
parent 6adf3c2499
commit 481e1f76e8

View file

@ -425,7 +425,6 @@ gst_srtp_enc_create_session (GstSrtpEnc * filter)
gsize keysize;
if (filter->key == NULL) {
GST_OBJECT_UNLOCK (filter);
GST_ELEMENT_ERROR (filter, LIBRARY, SETTINGS,
("Cipher is not NULL, key must be set"),
("Cipher is not NULL, key must be set"));
@ -436,7 +435,6 @@ gst_srtp_enc_create_session (GstSrtpEnc * filter)
keysize = gst_buffer_get_size (filter->key);
if (expected != keysize) {
GST_OBJECT_UNLOCK (filter);
GST_ELEMENT_ERROR (filter, LIBRARY, SETTINGS,
("Master key size is wrong"),
("Expected master key of %d bytes, but received %" G_GSIZE_FORMAT