From fae0aa58c19a1918e7b7750b4862e2abcbc55788 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Thu, 24 Jul 2014 03:25:37 +0530 Subject: cleanup: Don't set pipeline state if there's no pipeline --- src/lib.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib.c b/src/lib.c index 868e060..838f9e2 100644 --- a/src/lib.c +++ b/src/lib.c @@ -94,8 +94,10 @@ stp_cleanup_transcode_server_ctx (TranscodeServerCtx *ctx) g_list_free (ctx->clients); /* Cleanup gstreamer pipeline */ - gst_element_set_state (ctx->pipeline, GST_STATE_NULL); - gst_object_unref (ctx->pipeline); + if (ctx->pipeline) { + gst_element_set_state (ctx->pipeline, GST_STATE_NULL); + gst_object_unref (ctx->pipeline); + } g_free (ctx); } -- cgit v0.11.2-2-gd1dd