diff options
author | Thiago Santos <thiagoss@osg.samsung.com> | 2016-05-14 12:57:41 -0300 |
---|---|---|
committer | Thiago Santos <thiagoss@osg.samsung.com> | 2016-05-15 06:40:01 -0300 |
commit | 325741d37da75d369719a09b121f6f8ca28ebd4c (patch) | |
tree | 236d80920748ac06570805081c780ec13e5bca9a | |
parent | 075a6260fdf0b70d94be485625885e58b2ef6986 (diff) |
souphttpsrc: check if request was cancelled when sending message
It might be that the request was aborted by the application and
we can return immediatelly
-rw-r--r-- | ext/soup/gstsouphttpsrc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/soup/gstsouphttpsrc.c b/ext/soup/gstsouphttpsrc.c index ba00c431f..797f1e994 100644 --- a/ext/soup/gstsouphttpsrc.c +++ b/ext/soup/gstsouphttpsrc.c @@ -1392,6 +1392,10 @@ gst_soup_http_src_send_message (GstSoupHTTPSrc * src) /* FIXME We are ignoring the GError here, might be useful to debug */ src->input_stream = soup_session_send (src->session, src->msg, src->cancellable, NULL); + + if (g_cancellable_is_cancelled (src->cancellable)) + return GST_FLOW_FLUSHING; + gst_soup_http_src_got_headers (src, src->msg); if (src->ret != GST_FLOW_OK) { return src->ret; |