From: Jaroslav Kysela Date: Thu, 26 Nov 2015 19:45:33 +0000 (+0100) Subject: HTTP streaming: improve the packet timeout handling X-Git-Tag: v4.2.1~1456 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2b17a34b96ee318651d3e8387990bfd0ade6963a;p=thirdparty%2Ftvheadend.git HTTP streaming: improve the packet timeout handling --- diff --git a/src/webui/webui.c b/src/webui/webui.c index 63a34daef..68a26946c 100644 --- a/src/webui/webui.c +++ b/src/webui/webui.c @@ -361,14 +361,16 @@ http_stream_run(http_connection_t *hc, profile_chain_t *prch, switch(sm->sm_type) { case SMT_MPEGTS: case SMT_PACKET: - lastpkt = dispatch_clock; if(started) { pktbuf_t *pb; + int len; if (sm->sm_type == SMT_PACKET) pb = ((th_pkt_t*)sm->sm_data)->pkt_payload; else pb = sm->sm_data; - subscription_add_bytes_out(s, pktbuf_len(pb)); + subscription_add_bytes_out(s, len = pktbuf_len(pb)); + if (len > 0) + lastpkt = dispatch_clock; muxer_write_pkt(mux, sm->sm_type, sm->sm_data); sm->sm_data = NULL; }