diff options
author | Göran Jönsson <goranjn@axis.com> | 2014-09-16 11:41:52 +0200 |
---|---|---|
committer | Wim Taymans <wtaymans@redhat.com> | 2014-09-16 11:41:52 +0200 |
commit | 23b9d8fbb04ceff21110086528591849c728ae48 (patch) | |
tree | e20a18909c6513c6f97b995ec99d7ad827eedc56 | |
parent | ebd9be59fe63b242d6c7f3c28088c73392927b3b (diff) |
We need to raise the backlog limits before pausing the pipeline or else
the appsink might be blocking in the render method in wait_backlog() and
we would deadlock waiting for paused.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=736322
-rw-r--r-- | gst/rtsp-server/rtsp-client.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gst/rtsp-server/rtsp-client.c b/gst/rtsp-server/rtsp-client.c index d616e84..9cd69bc 100644 --- a/gst/rtsp-server/rtsp-client.c +++ b/gst/rtsp-server/rtsp-client.c @@ -961,6 +961,7 @@ bad_request: static gboolean handle_pause_request (GstRTSPClient * client, GstRTSPContext * ctx) { + GstRTSPClientPrivate *priv = client->priv; GstRTSPSession *session; GstRTSPClientClass *klass; GstRTSPSessionMedia *sessmedia; @@ -996,6 +997,11 @@ handle_pause_request (GstRTSPClient * client, GstRTSPContext * ctx) rtspstate != GST_RTSP_STATE_RECORDING) goto invalid_state; + /* No limit on watch queue because else we might be blocking in the appsink + * render method and the PAUSE below will hang */ + if (priv->watch != NULL) + gst_rtsp_watch_set_send_backlog (priv->watch, 0, 0); + /* then pause sending */ gst_rtsp_session_media_set_state (sessmedia, GST_STATE_PAUSED); @@ -1006,6 +1012,9 @@ handle_pause_request (GstRTSPClient * client, GstRTSPContext * ctx) send_message (client, ctx, ctx->response, FALSE); + if (priv->watch != NULL) + gst_rtsp_watch_set_send_backlog (priv->watch, 0, WATCH_BACKLOG_SIZE); + /* the state is now READY */ gst_rtsp_session_media_set_rtsp_state (sessmedia, GST_RTSP_STATE_READY); |