--- tvheadend/src/satip/rtsp.c 2016-04-04 14:00:41.187765643 +0200 +++ tvheadend/src/satip/rtsp.c 2016-04-04 14:39:47.289866499 +0200 @@ -577,6 +578,11 @@ rtsp_start if (oldstate) { setup = 0; rs->state = STATE_SETUP; + tvhtrace("satips", "Change State to SETUP (1)"); + } + if (setup && (rs->state == STATE_DESCRIBE)) { + rs->state = STATE_SETUP; + tvhtrace("satips", "Change State to SETUP (2)"); } } else { pids: @@ -590,7 +596,7 @@ pids: if (rs->used_weight != weight && weight > 0) subscription_set_weight(rs->subs, rs->used_weight = weight); } - if (!setup && rs->state != STATE_PLAY) { + if ((!setup && rs->state != STATE_PLAY) || (setup && (rs->state == STATE_SETUP))) { if (rs->mux == NULL) goto endclean; satip_rtp_queue((void *)(intptr_t)rs->stream, @@ -1223,7 +1229,7 @@ rtsp_describe_header(session_t *rs, htsb static void rtsp_describe_session(session_t *rs, htsbuf_queue_t *q) { - char buf[4096]; + char buf[8192]; htsbuf_qprintf(q, "a=control:stream=%d\r\n", rs->stream); htsbuf_append_str(q, "a=tool:tvheadend\r\n"); @@ -1232,10 +1238,15 @@ rtsp_describe_session(session_t *rs, hts htsbuf_append_str(q, "c=IN IP6 ::0\r\n"); else htsbuf_append_str(q, "c=IN IP4 0.0.0.0\r\n"); + tvhtrace("satips", "Rtsp_describe_session: rs->state=%i,rs->stream=%i",rs->state,rs->stream); if (rs->state == STATE_PLAY) { satip_rtp_status((void *)(intptr_t)rs->stream, buf, sizeof(buf)); htsbuf_qprintf(q, "a=fmtp:33 %s\r\n", buf); htsbuf_append_str(q, "a=sendonly\r\n"); + } else if (rs->state == STATE_SETUP) { + //fixme: send real tuner status (at this point the status is empty!) + htsbuf_append_str(q, "a=fmtp:33 ver=1.0;src=0;tuner=0,240,1,15,,,,,,,,;pids=all\r\n"); + htsbuf_append_str(q, "a=sendonly\r\n"); } else { htsbuf_append_str(q, "a=fmtp:33\r\n"); htsbuf_append_str(q, "a=inactive\r\n");