summaryrefslogtreecommitdiff
path: root/src/lib.c
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2014-07-10 15:12:34 (GMT)
committerNirbheek Chauhan <nirbheek@centricular.com>2014-07-10 15:14:52 (GMT)
commitaefc695d53e0d519d438741ca96923b95212f73a (patch)
tree8c598f51500299ad3863a6ba5e3d091409d0ef03 /src/lib.c
parent720b406ed6382187bbb60ec9038828178d58736b (diff)
downloadsoup-transcoding-proxy-aefc695d53e0d519d438741ca96923b95212f73a.zip
soup-transcoding-proxy-aefc695d53e0d519d438741ca96923b95212f73a.tar.gz
appsink: Add a client timeout, and handle eos separately
If no chunks are written to a client for 10 seconds, we end that stream and clean it up. This is currently happening due to a bug, but might happen due to bad/slow clients as well. Instead of handling EOS from null samples, handle EOS through the signal handler. This is a more reliable way of handling EOS, and also works when the whole pipeline is torn down because the PUT stream ended.
Diffstat (limited to 'src/lib.c')
-rw-r--r--src/lib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib.c b/src/lib.c
index cb24fa6..b36015d 100644
--- a/src/lib.c
+++ b/src/lib.c
@@ -90,6 +90,8 @@ stp_cleanup_transcode_client_ctx (TranscodeClientCtx *ctx)
g_print (">>> Doing client cleanup.");
+ g_source_remove (ctx->timeout_handler_id);
+
server_ctx->clients = g_list_remove (server_ctx->clients, ctx);
/* Block sinkpad and srcpad, then unlink and remove */