gstreamer: Remove some leaks if pipeline cannot be created

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
This commit is contained in:
Frediano Ziglio 2017-04-07 13:21:49 +01:00
parent 11e04a100d
commit 4725ec03b1

View File

@ -1745,6 +1745,8 @@ VideoEncoder *gstreamer_encoder_new(SpiceVideoCodecType codec_type,
if (!create_pipeline(encoder)) {
/* Some GStreamer dependency is probably missing */
pthread_cond_destroy(&encoder->outbuf_cond);
pthread_mutex_destroy(&encoder->outbuf_mutex);
free(encoder);
encoder = NULL;
}