[raop] Remove flush timer, the player now takes care of stopping

Player now stops 10 secs after stop command and 10 mins after pause. At
that time the outputs have probably cut the connection themselves, but
that might be ok (needs testing).
This commit is contained in:
ejurgensen 2019-02-25 20:04:23 +01:00
parent 2893e597c3
commit 50c7d96bc4

View File

@ -1939,7 +1939,7 @@ session_teardown_cb(struct evrtsp_request *req, void *arg)
if (!req || req->response_code != RTSP_OK)
DPRINTF(E_LOG, L_RAOP, "TEARDOWN request failed in session shutdown: %d %s\n", req->response_code, req->response_code_line);
rs->state = OUTPUT_STATE_STOPPED;
rs->state = RAOP_STATE_STOPPED;
raop_status(rs);
@ -4817,7 +4817,6 @@ static int
raop_device_flush(struct output_device *device, int callback_id)
{
struct raop_session *rs = device->session;
struct timeval tv;
int ret;
if (rs->state != RAOP_STATE_STREAMING)
@ -4829,10 +4828,6 @@ raop_device_flush(struct output_device *device, int callback_id)
rs->callback_id = callback_id;
evutil_timerclear(&tv);
tv.tv_sec = 10;
evtimer_add(rs->deferredev, &tv);
return 0;
}
@ -4902,8 +4897,6 @@ raop_write(struct output_buffer *obuf)
if (rs->state != RAOP_STATE_CONNECTED)
continue;
event_del(rs->deferredev); // Kills flush timer in case playback was stopped but then restarted again
rs->state = RAOP_STATE_STREAMING;
// Make a cb?
}