diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2014-07-15 10:55:23 (GMT) |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2014-07-15 10:55:23 (GMT) |
commit | 92f29b97038ba686fe298b55681802b9ef8de73d (patch) | |
tree | 1e0000bc3987f1274efc962eda82cbdbd1e40e72 /src | |
parent | e803e9fbda506f88cb4688c6ff7224877cfad2b4 (diff) | |
download | soup-transcoding-proxy-92f29b97038ba686fe298b55681802b9ef8de73d.zip soup-transcoding-proxy-92f29b97038ba686fe298b55681802b9ef8de73d.tar.gz |
appsink: Fix a rare crash
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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"); |