module-raop-sink: Drop the RTSP FLUSH request

The RTSP FLUSH request does not seem to be required.

This change also fixes an issue where another RECORD request is
erroneously sent when the stream switches back from paused to streaming
by only setting `impl->streaming = false` in `rtsp_do_teardown()`.
This commit is contained in:
Christian Glombek 2023-10-09 07:15:05 +02:00 committed by Wim Taymans
parent e8d6407c4e
commit d063dbdb62

View file

@ -953,27 +953,6 @@ static int rtsp_log_reply_status(void *data, int status, const struct spa_dict *
return 0;
}
static int rtsp_do_flush(struct impl *impl)
{
int res;
if (!impl->recording)
return 0;
pw_properties_set(impl->headers, "Range", "npt=0-");
pw_properties_setf(impl->headers, "RTP-Info",
"seq=%u;rtptime=%u", impl->seq, impl->rtptime);
impl->recording = false;
res = rtsp_send(impl, "FLUSH", NULL, NULL, rtsp_log_reply_status);
pw_properties_set(impl->headers, "Range", NULL);
pw_properties_set(impl->headers, "RTP-Info", NULL);
return res;
}
static int rtsp_send_volume(struct impl *impl)
{
if (!impl->recording)
@ -1647,9 +1626,6 @@ static void stream_state_changed(void *d, enum pw_stream_state old,
case PW_STREAM_STATE_UNCONNECTED:
pw_impl_module_schedule_destroy(impl->module);
break;
case PW_STREAM_STATE_PAUSED:
rtsp_do_flush(impl);
break;
case PW_STREAM_STATE_STREAMING:
rtsp_do_record(impl);
break;
@ -1701,6 +1677,8 @@ static int rtsp_teardown_reply(void *data, int status, const struct spa_dict *he
static int rtsp_do_teardown(struct impl *impl)
{
impl->recording = false;
if (!impl->ready)
return 0;