diff options
Diffstat (limited to 'src/lib.c')
-rw-r--r-- | src/lib.c | 19 |
1 files changed, 2 insertions, 17 deletions
@@ -42,9 +42,7 @@ stp_cleanup_transcode_server_ctx (TranscodeServerCtx *ctx) { g_print (">>> Doing server cleanup\n"); - /* Closing the stream should send a HUP on the fd and - * trigger cleanup in write_get_response_body_chunk() */ - g_list_foreach (ctx->clients, (GFunc)stp_close_client_ctx, NULL); + g_list_foreach (ctx->clients, (GFunc)stp_cleanup_transcode_client_ctx, NULL); g_list_free (ctx->clients); /* Cleanup gstreamer pipeline */ @@ -92,10 +90,7 @@ stp_cleanup_transcode_client_ctx (TranscodeClientCtx *ctx) g_print (">>> Doing client cleanup."); - /* If we're cleaning up because the server is shutting down, - * this will be NULL */ - if (server_ctx) - server_ctx->clients = g_list_remove (server_ctx->clients, ctx); + server_ctx->clients = g_list_remove (server_ctx->clients, ctx); /* Block sinkpad and srcpad, then unlink and remove */ srcpad = gst_pad_get_peer (ctx->ghostsinkpad); @@ -107,16 +102,6 @@ stp_cleanup_transcode_client_ctx (TranscodeClientCtx *ctx) g_print ("."); } -void -stp_close_client_ctx (TranscodeClientCtx *ctx) -{ - g_print (">>> Doing client cleanup\n"); - - ctx->server_ctx = NULL; - - g_free (ctx); -} - /* Returns a copy of the streamheader GstBuffer */ GstBuffer* stp_get_streamheader_from_caps (GstCaps *caps) |