summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index 2d3e537..e9be17d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -124,9 +124,9 @@ invoke_write_client_chunk (TranscodeClientCtx *ctx)
stp_print_status ("*");
/* XXX: If samples are coming in too quickly, this can get invoked
- * after the client has disconnected and the SoupMessage is invalid
- * So, we check if the msg is still a msg before trying to append. */
- if (G_UNLIKELY (!SOUP_IS_MESSAGE (ctx->msg)))
+ * after the client has disconnected and the SoupMessage is invalid.
+ * When the client disconnects, timeout_handler_id is set to 0. */
+ if (G_UNLIKELY (ctx->timeout_handler_id == 0))
return FALSE;
g_signal_emit_by_name (ctx->appsink, "pull-sample", &sample);