diff options
author | Sergio Torres Soldado <torres.soldado@gmail.com> | 2016-07-04 17:19:08 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2016-07-25 13:19:04 +0300 |
commit | 65440cb3fd156de2269354c5ba7942d02b68bd35 (patch) | |
tree | f4ac3610515fef60efdc3e74b1e9dcbc6c48dac0 | |
parent | 10a85157982e46a1dc7cac40601d33b22b84fdcb (diff) | |
download | gstreamer-plugins-base-65440cb3fd156de2269354c5ba7942d02b68bd35.tar.gz |
rtspconnection: Fix potential deadlock caused by blocking read forever
Reset the connection "may_cancel" property to avoid a potential deadlock
if there is no data to read and the socket stays blocked forever.
https://bugzilla.gnome.org/show_bug.cgi?id=768249
-rw-r--r-- | gst-libs/gst/rtsp/gstrtspconnection.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gst-libs/gst/rtsp/gstrtspconnection.c b/gst-libs/gst/rtsp/gstrtspconnection.c index 3e5add4ce..309421c9d 100644 --- a/gst-libs/gst/rtsp/gstrtspconnection.c +++ b/gst-libs/gst/rtsp/gstrtspconnection.c @@ -2161,11 +2161,13 @@ build_next (GstRTSPBuilder * builder, GstRTSPMessage * message, } } done: + conn->may_cancel = TRUE; return res; /* ERRORS */ invalid_body_len: { + conn->may_cancel = TRUE; GST_DEBUG ("could not allocate body"); return GST_RTSP_ERROR; } |