Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
HTTP streaming: improve the packet timeout handling
  • Loading branch information
perexg committed Nov 26, 2015
1 parent a765bc6 commit 2b17a34
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/webui/webui.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 2b17a34

Please sign in to comment.