mirror of
https://github.com/owntone/owntone-server.git
synced 2025-02-26 12:59:19 -05:00
[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:
parent
2893e597c3
commit
50c7d96bc4
@ -1939,7 +1939,7 @@ session_teardown_cb(struct evrtsp_request *req, void *arg)
|
|||||||
if (!req || req->response_code != RTSP_OK)
|
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);
|
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);
|
raop_status(rs);
|
||||||
|
|
||||||
@ -4817,7 +4817,6 @@ static int
|
|||||||
raop_device_flush(struct output_device *device, int callback_id)
|
raop_device_flush(struct output_device *device, int callback_id)
|
||||||
{
|
{
|
||||||
struct raop_session *rs = device->session;
|
struct raop_session *rs = device->session;
|
||||||
struct timeval tv;
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (rs->state != RAOP_STATE_STREAMING)
|
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;
|
rs->callback_id = callback_id;
|
||||||
|
|
||||||
evutil_timerclear(&tv);
|
|
||||||
tv.tv_sec = 10;
|
|
||||||
evtimer_add(rs->deferredev, &tv);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4902,8 +4897,6 @@ raop_write(struct output_buffer *obuf)
|
|||||||
if (rs->state != RAOP_STATE_CONNECTED)
|
if (rs->state != RAOP_STATE_CONNECTED)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
event_del(rs->deferredev); // Kills flush timer in case playback was stopped but then restarted again
|
|
||||||
|
|
||||||
rs->state = RAOP_STATE_STREAMING;
|
rs->state = RAOP_STATE_STREAMING;
|
||||||
// Make a cb?
|
// Make a cb?
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user