summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2014-07-23 21:55:37 (GMT)
committerNirbheek Chauhan <nirbheek@centricular.com>2014-07-23 21:55:37 (GMT)
commitfae0aa58c19a1918e7b7750b4862e2abcbc55788 (patch)
tree7045fd1aba8f0a5b8da4641a1bc8a7b2be40b193
parent42440099f201f4d438c1dd2918c77bc8e95814bd (diff)
downloadsoup-transcoding-proxy-fae0aa58c19a1918e7b7750b4862e2abcbc55788.zip
soup-transcoding-proxy-fae0aa58c19a1918e7b7750b4862e2abcbc55788.tar.gz
cleanup: Don't set pipeline state if there's no pipeline
-rw-r--r--src/lib.c6
1 files 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);
}