]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
HTTP streaming: improve the packet timeout handling
authorJaroslav Kysela <perex@perex.cz>
Thu, 26 Nov 2015 19:45:33 +0000 (20:45 +0100)
committerJaroslav Kysela <perex@perex.cz>
Thu, 26 Nov 2015 19:45:33 +0000 (20:45 +0100)
src/webui/webui.c

index 63a34daef6b4c425cf945feb213a152fd380385f..68a26946cd14a18224ec29e689f8cea96d16cf96 100644 (file)
@@ -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;
       }