opusenc: add missing mutex unlock on error path
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Fri, 15 Jun 2012 09:32:39 +0000 (10:32 +0100)
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Fri, 15 Jun 2012 09:39:48 +0000 (10:39 +0100)
ext/opus/gstopusenc.c

index 861bd415d80662db19b24aeceabda07d2708d423..5386286ff2100340862d99a470485dd06162a12b 100644 (file)
@@ -621,8 +621,10 @@ gst_opus_enc_set_format (GstAudioEncoder * benc, GstAudioInfo * info)
     opus_multistream_encoder_destroy (enc->state);
     enc->state = NULL;
   }
-  if (!gst_opus_enc_setup (enc))
+  if (!gst_opus_enc_setup (enc)) {
+    g_mutex_unlock (enc->property_lock);
     return FALSE;
+  }
 
   enc->frame_samples = gst_opus_enc_get_frame_samples (enc);