raop: Do not send audio before RECORD response

This patch prevents audio packets to be sent before the server
respond to the RECORD command.
This commit is contained in:
Martin Blanchard 2016-11-06 12:54:01 -06:00 committed by Tanu Kaskinen
parent 29385da239
commit 604bf450dc
3 changed files with 28 additions and 4 deletions

View file

@ -310,7 +310,7 @@ static int udp_sink_process_msg(pa_msgobject *o, int code, void *data, int64_t o
pa_log_debug("RAOP: SUSPENDED");
pa_smoother_pause(u->smoother, pa_rtclock_now());
if (pa_raop_client_udp_can_stream(u->raop)) {
if (pa_raop_client_udp_is_alive(u->raop)) {
/* Issue a TEARDOWN if we are still connected. */
pa_raop_client_teardown(u->raop);
}
@ -756,10 +756,10 @@ static void udp_thread_func(struct userdata *u) {
continue;
}
if (!pa_raop_client_udp_can_stream(u->raop))
continue;
if (u->sink->thread_info.state != PA_SINK_RUNNING)
continue;
if (!pa_raop_client_udp_can_stream(u->raop))
continue;
if (u->encoded_memchunk.length <= 0) {
if (u->encoded_memchunk.memblock != NULL)