[pulseaudio-discuss] [PATCH v6 32/37] raop: Stop recording when RTSP FLUSH is issued

Hajime Fujita crisp.fujita at gmail.com
Sun Jan 31 20:16:29 PST 2016


From: Hajime Fujita <crisp.fujita at nifty.com>

This patch fixes the issue #31.
https://github.com/hfujita/pulseaudio-raop2/issues/31

This patch sets c->is_recording = false when the RTSP FLUSH command
is issued. This avoids a race between the server response and
the record activation in some cases.
---
 src/modules/raop/raop-client.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/modules/raop/raop-client.c b/src/modules/raop/raop-client.c
index d8de2ae..9dc40f4 100644
--- a/src/modules/raop/raop-client.c
+++ b/src/modules/raop/raop-client.c
@@ -1114,8 +1114,6 @@ static void rtsp_stream_cb(pa_rtsp_client *rtsp, pa_rtsp_state_t state, pa_rtsp_
         case STATE_FLUSH: {
             pa_log_debug("RAOP: FLUSHED");
 
-            c->is_recording = false;
-
             break;
         }
 
@@ -1613,6 +1611,8 @@ int pa_raop_client_flush(pa_raop_client *c) {
         return 1;
     }
 
+    c->is_recording = false;
+
     rv = pa_rtsp_flush(c->rtsp, c->seq, c->rtptime);
     return rv;
 }
-- 
2.5.0



More information about the pulseaudio-discuss mailing list