summaryrefslogtreecommitdiff
path: root/src/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.c')
-rw-r--r--src/lib.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib.c b/src/lib.c
index 019b4f7..868e060 100644
--- a/src/lib.c
+++ b/src/lib.c
@@ -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 */