diff options
Diffstat (limited to 'src/lib.c')
-rw-r--r-- | src/lib.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -24,14 +24,14 @@ static void stp_disconnect_cleanup_client (TranscodeClientCtx *ctx); -static gboolean +gboolean invoke_g_hash_table_remove (TranscodeServerCtx *ctx) { g_hash_table_remove (ctx->parent_ctx_table, ctx->path); return G_SOURCE_REMOVE; } -static gboolean +gboolean invoke_g_free_client_context (TranscodeClientCtx *ctx) { g_free (ctx); @@ -56,7 +56,8 @@ stp_on_gst_bus_message (GstBus *bus, g_free (tmp); /* Setting the server response will only work if the request * hasn't already finished, so we check that */ - if (!ctx->stream_finished) + if (ctx->status == STP_STATUS_STREAMING && + ctx->encoding != SOUP_ENCODING_CONTENT_LENGTH) soup_message_set_status (ctx->msg, SOUP_STATUS_INTERNAL_SERVER_ERROR); /* Cleanup in the default main context, * because GHashTable is not thread-safe */ |