summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index b0a102c..44b3201 100644
--- a/src/main.c
+++ b/src/main.c
@@ -121,6 +121,13 @@ invoke_write_client_chunk (TranscodeClientCtx *ctx)
gboolean eos;
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)))
+ return FALSE;
+
g_signal_emit_by_name (ctx->appsink, "pull-sample", &sample);
if (!sample) {
g_debug ("Null sample, ending stream");