1
0
Fork 0
mirror of https://github.com/albfan/miraclecast.git synced 2025-03-09 23:38:56 +00:00

miracle-wfdctl: add timeout value and Range header to the reply of PLAY request

This commit is contained in:
Derek Dai 2017-02-16 14:15:48 +08:00
parent d4cdaf9bca
commit 643b023225
No known key found for this signature in database
GPG key ID: E109CC97553EF009

View file

@ -405,6 +405,7 @@ static int wfd_out_session_handle_play_request(struct wfd_session *s,
enum wfd_session_state *new_state,
enum rtsp_message_id *next_request)
{
_shl_free_ char *v;
_rtsp_message_unref_ struct rtsp_message *m = NULL;
int r;
@ -415,8 +416,18 @@ static int wfd_out_session_handle_play_request(struct wfd_session *s,
if(0 > r) {
return r;
}
r = asprintf(&v, "%d;timeout=30", s->stream.id);
if(0 > r) {
return r;
}
r = rtsp_message_append(m, "<u>", "Session", (uint32_t) s->id);
r = rtsp_message_append(m, "<s>", "Session", v);
if(0 > r) {
return r;
}
r = rtsp_message_append(m, "<s>", "Range", "ntp=now-");
if(0 > r) {
return r;
}