diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -348,9 +348,10 @@ GET: gst_pad_add_probe (srcpad, GST_PAD_PROBE_TYPE_BLOCK, (GstPadProbeCallback) tee_src_pad_blocked_cb, client_ctx, NULL); + gst_object_unref (template); gst_object_unref (srcpad); + gst_object_unref (tee); - gst_object_ref (appsink); client_ctx->appsink = appsink; g_signal_connect (appsink, "new-sample", @@ -399,7 +400,7 @@ got_request_body_chunk (SoupMessage *msg, if (ret != GST_FLOW_OK) { g_critical ("Unable to push buffer\n"); soup_message_set_status (msg, SOUP_STATUS_INTERNAL_SERVER_ERROR); - stp_cleanup_transcode_server_ctx (ctx); + g_hash_table_remove (ctx->parent_ctx_table, ctx->path); return; } } @@ -449,7 +450,7 @@ got_first_request_body_chunk (SoupMessage *msg, GST_STATE_CHANGE_FAILURE) { g_critical ("Unable to set pipeline to PLAYING\n"); soup_message_set_status (msg, SOUP_STATUS_INTERNAL_SERVER_ERROR); - stp_cleanup_transcode_server_ctx (ctx); + g_hash_table_remove (ctx->parent_ctx_table, ctx->path); } else { g_print ("Set pipeline to PLAYING\n"); } @@ -605,10 +606,10 @@ GET: { if (!server_ctx->stream_finished) { /* Close the PUT stream if necessary */ server_ctx->stream_finished = TRUE; - soup_message_set_status (server_ctx->msg, SOUP_STATUS_OK); + soup_message_set_status (server_ctx->msg, SOUP_STATUS_GONE); } /* Disconnect all clients, and shut down the stream */ - stp_cleanup_transcode_server_ctx (server_ctx); + g_hash_table_remove (ctx_table, server_ctx->path); soup_message_set_status (msg, SOUP_STATUS_OK); goto out; } |