Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
SAT>IP Client: maintain session also in the idle mode
  • Loading branch information
perexg committed Mar 17, 2015
1 parent e1b2da8 commit 74adbe8
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/input/mpegts/satip/satip_frontend.c
Expand Up @@ -1207,10 +1207,16 @@ satip_frontend_input_thread ( void *aux )
efd = tvhpoll_create(4);
rtsp = NULL;

/* Setup buffers */
sbuf_init(&sb);
udp_multirecv_init(&um, 0, 0);

/*
* New tune
*/
new_tune:
sbuf_free(&sb);
udp_multirecv_free(&um);
udp_close(rtcp);
udp_close(rtp);
rtcp = rtp = NULL;
Expand Down Expand Up @@ -1246,11 +1252,22 @@ satip_frontend_input_thread ( void *aux )
}
}

if (ev[0].data.ptr == rtsp) {
if (rtsp && ev[0].data.ptr == rtsp) {
r = http_client_run(rtsp);
if (r < 0) {
http_client_close(rtsp);
rtsp = NULL;
} else {
switch (rtsp->hc_cmd) {
case RTSP_CMD_OPTIONS:
rtsp_options_decode(rtsp);
break;
case RTSP_CMD_SETUP:
rtsp_setup_decode(rtsp, 1);
break;
default:
break;
}
}
}

Expand Down

0 comments on commit 74adbe8

Please sign in to comment.